Page 1 of 1

*** SOLVED *** question about event link

Posted: Sun Feb 18, 2024 5:49 pm
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? 😊

Re: question about event link

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

Code: Select all

cursor: pointer;

Re: question about event link

Posted: Sun Feb 18, 2024 6:35 pm
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! 😄

Re: question about event link

Posted: Sun Feb 18, 2024 6:36 pm
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

Re: question about event link

Posted: Sun Feb 18, 2024 6:39 pm
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 🤗

Re: question about event link

Posted: Sun Feb 18, 2024 8:45 pm
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

Re: question about event link

Posted: Sun Feb 18, 2024 9:31 pm
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.

Re: question about event link

Posted: Sun Feb 18, 2024 11:02 pm
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>

Re: question about event link

Posted: Sun Feb 18, 2024 11:36 pm
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

Re: question about event link

Posted: Sun Feb 18, 2024 11:38 pm
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.