Hi,
I need to put an onclick event on an element (text) of a page. But of course, I don't want the page to change (it must start a video at a defined time).
I've tried a lot of things, but it always goes to the index page, or refresh the page (I tried : href="#", {cms_selflink}, nothing in href...), or don't save the link (with empty href case).
Has someone a way to avoid this issue ?
Thank you
<solved> Event on a link without changing/refreshing page
<solved> Event on a link without changing/refreshing page
Last edited by trezel on Mon Feb 20, 2012 8:37 am, edited 1 time in total.
Re: Event on a link without changing/refreshing page
Hard to give advice confidently when your post does not include more details, but if you have a function you call on onclick(), end that call with "return false;" - this should, in theory, allow you to trap the call, do what you need, but change the default behavior.
Hope that helps.
-S
Hope that helps.
-S
Re: Event on a link without changing/refreshing page
Hi,
That's exactly what I was looking for. It works.
Thanks
That's exactly what I was looking for. It works.
Thanks