homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

anchor double click event handling

 3:02 am on Oct 24, 2009 (gmt 0)

I have an anchor in my page which has href property set to a remote url. What i want is when someone double clicks the anchor page should not redirect to designated URL but one javascript function will carry out some operation.

I tried to set the href property "#" in function which is triggered after double click but it did not work the page still redirect to remote URL.

Can this be done



 3:47 pm on Oct 26, 2009 (gmt 0)

If you want both single and double click to work then wrap the contents using a different element like span, label, li etc.

If you only need the double-click you can do something like,

<a href="#" onClick="return false;" onDblClick="doSomething();return false;">Link</a>


 3:56 pm on Oct 26, 2009 (gmt 0)

hmm.thanks zipper
let me have a try

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved