I use anchors to call javascript functions. Usually, I do this:

<a href="javascript:void(0)" onclick="someFunc(); return false;">
   call the function

This works fine in all browsers. Window.onbeforeunload is never
triggered because the ONCLICK returns false, and thus the HREF if not
executed. When HREF is not executed, the browser does not believe that
the window in unloading. Now, I'm trying to create a dynamic anchor to
accomplish the same thing. It looks nearly identical to the HTML
anchor, but now it's triggering window.onbeforeunload in IE8. How do I
not trigger it?

dynamicAnchor = new Element(
    'a', {
        href: 'javascript:void(0)',
    function(parameter) {
        return function() {
            window.status = parameter;
            return false;

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to