Use JQuery or onbeforeunload for IE and FF
I'm working in a Flex4 application, using javascript, in the "index.template.html" document. I'm having an issue being able to use onbeforeunload with Firefox. The application works perfectly in IE, but the exact same one doesn't sit well with FF. (See below) <script type="text/javascript"> window.onbeforeunload=before; window.onunload=after; function before(evt) { var flex=document.$(application)||window.$(application); flex.unloadMethod(); //custom method to log out the user } function after(evt) { } </script> From what I've found, FF doesn't seem to register onbeforeunload events, so I