Thursday, February 21, 2013

Re: Difficulties with addWindowClosingHandler in IE

Thanks - doing it the first way, changing the href to '#' and adding the current code to call my function and then returning false to a click handler, worked.

The second way, simply returning false from within the javascript code embedded in the href itself, did not seem to change the behavior at all.

Ryan

On Wednesday, February 20, 2013 6:50:42 AM UTC-5, Jens wrote:
<a href="#" onclick="yourFunction(); return false;"> link </a>

Adding return false; has the same result as calling event.preventDefault() and event.stopPropagation().

You can also do that on the href attribute directly I guess.

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment