I use anchors to call javascript functions. Usually, I do this: <a href="javascript:void(0)" onclick="someFunc(); return false;"> call the function </a>
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)', } ).observe( 'click', function(parameter) { return function() { window.status = parameter; return false; } }(localVariable) ); -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.