*** SOLVED *** question about event link

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
User avatar
Mary Abigail
 
 
Posts: 152
Joined: Thu Jul 08, 2021 9:46 pm
Location: Lisbon, Portugal

*** SOLVED *** question about event link

Post by Mary Abigail »

Hi everybody 🙂

is there an easy way to turn the mouse pointer icon with a "hand pointer" (common web icon when we click on a link) when i create an event within an object (a shape for instance)?

suppose i create this:

Event: onclick
Action: link
Target: xxx.xxx.com

i know this is possible to do with the Style Manager and assign the hand pointer (or other icon) css style to the event as i see it the only way for doing it now...

any ideas? 😊
Last edited by Mary Abigail on Mon Feb 19, 2024 3:43 pm, edited 2 times in total.
Mary

"It was always my belief that rock and roll belonged in the hands of the people, not rock stars" - Patti Smith
User avatar
Pablo
 
Posts: 22163
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: question about event link

Post by Pablo »

You can add this code to the 'Custom Style' section

Code: Select all

cursor: pointer;
User avatar
Mary Abigail
 
 
Posts: 152
Joined: Thu Jul 08, 2021 9:46 pm
Location: Lisbon, Portugal

Re: question about event link

Post by Mary Abigail »

Pablo wrote: Sun Feb 18, 2024 6:27 pm You can add this code to the 'Custom Style' section

Code: Select all

cursor: pointer;
Hi Pablo... did not remember this haha. Simple and pratical. Thank youu! 😄
Mary

"It was always my belief that rock and roll belonged in the hands of the people, not rock stars" - Patti Smith
User avatar
BaconFries
 
 
Posts: 5541
Joined: Thu Aug 16, 2007 7:32 pm

Re: question about event link

Post by BaconFries »

Carrying on from Pablos reply see the following for a full list that can be used.
https://www.w3schools.com/cssref/pr_class_cursor.php
User avatar
Mary Abigail
 
 
Posts: 152
Joined: Thu Jul 08, 2021 9:46 pm
Location: Lisbon, Portugal

Re: question about event link

Post by Mary Abigail »

BaconFries wrote: Sun Feb 18, 2024 6:36 pm Carrying on from Pablos reply see the following for a full list that can be used.
https://www.w3schools.com/cssref/pr_class_cursor.php
Hi BaconFries, thanks for sharing 🤗
Mary

"It was always my belief that rock and roll belonged in the hands of the people, not rock stars" - Patti Smith
User avatar
Mary Abigail
 
 
Posts: 152
Joined: Thu Jul 08, 2021 9:46 pm
Location: Lisbon, Portugal

Re: question about event link

Post by Mary Abigail »

@Pablo, one last question:
inside the event window it doesn't let me choose the target window [ex: _blank), do i have to put the code in the HTML object by myself?

thank you
Mary

"It was always my belief that rock and roll belonged in the hands of the people, not rock stars" - Patti Smith
User avatar
crispy68
 
 
Posts: 2833
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: question about event link

Post by crispy68 »

If you are adding a link to the shape, why not just use the normal link option which allows you to set the target?

I'm not sure that it is possible to set target=_blank with an event with the code being generated.
User avatar
BaconFries
 
 
Posts: 5541
Joined: Thu Aug 16, 2007 7:32 pm

Re: question about event link

Post by BaconFries »

@mary
Use the following for the event

Code: Select all

onclick="openBlank()"
In Page HTML Insert between <body></body>

Code: Select all

<script>
function openBlank() {
window.open('https://www.yourlinkurlhere.com/', '_blank');
}
</script>
User avatar
Mary Abigail
 
 
Posts: 152
Joined: Thu Jul 08, 2021 9:46 pm
Location: Lisbon, Portugal

Re: question about event link

Post by Mary Abigail »

crispy68 wrote: Sun Feb 18, 2024 9:31 pm If you are adding a link to the shape, why not just use the normal link option which allows you to set the target?

I'm not sure that it is possible to set target=_blank with an event with the code being generated.
Hi Crispy, i know what you mean, but in this case it's because of the shape clip-path thing i posted the other day, for instance, if i have a shape like a star, polygon, circle, etc, i just want it to be clickable inside the vertices and edges of the shape itself regardless of what that shape looks like. This can only be possible using the Events. The other common way lets me click inside and outsde the shape (not what i want to do).

BaconFries gave me the code, but i thank you too for the reply!

ps - the other post here:
viewtopic.php?p=492318#p492318
Last edited by Mary Abigail on Sun Feb 18, 2024 11:47 pm, edited 2 times in total.
Mary

"It was always my belief that rock and roll belonged in the hands of the people, not rock stars" - Patti Smith
User avatar
Mary Abigail
 
 
Posts: 152
Joined: Thu Jul 08, 2021 9:46 pm
Location: Lisbon, Portugal

Re: question about event link

Post by Mary Abigail »

BaconFries wrote: Sun Feb 18, 2024 11:02 pm @mary
Use the following for the event

Code: Select all

onclick="openBlank()"
In Page HTML Insert between <body></body>

Code: Select all

<script>
function openBlank() {
window.open('https://www.yourlinkurlhere.com/', '_blank');
}
</script>

@BaconFries, that will do the trick! Thank you.
Mary

"It was always my belief that rock and roll belonged in the hands of the people, not rock stars" - Patti Smith
Post Reply