Link with Javascript

Hi,

is it possible to insert a link like this ? I only want to use a text - change it in a link - and have to insert this link…

Bildschirmfoto 2023-03-15 um 14.27.53

Is there a way to implement that ?
thanks
tom

Search for something like

JavaScript link onclick href

And you’ll should find some answers :+1::wink:

2 Likes

Hi @Jannis
thanks - find a lot in google - but not sure how to do this in blocs app …

The code bric might help you.

1 Like

Cant you add it to the URL in the sidebar? Or does Blocs stop that?

Tom, just to explain what its doing, its just running a function when clicked. Thats why “onclick” is an option here, just use the custom attributes.

1 Like

Hi @Malachiman and @Jannis
Thanks for your answers …
I try to use the url in the sidebar. Also tried the onclick Attribut. Don’t get it to work. There are instructions what to do when the url not work - but the instructions for wordpress. I don’t try it with the html brick.
But I give it a try :+1::+1:

UPDATE

Both variations working. To insert the link on the sidebar, and also the onclick version …
The problem was Safari on my older Mac …
Firefox and chrome work well , but not Safari. On my new MacBook it also works on Safari.
Thanks

Tom

1 Like