jquery - onBeforeUnload custom button messages -


i have following beforeunload function have stolen sonewhere else....

$().ready(function() {     $("#posmanagerloginform").trigger("submit");      $(window).bind("beforeunload", function(){               window.settimeout(function () {             window.location = "home.htm";         }, 0);         window.onbeforeunload = null; // necessary prevent infinite loop kills browser         return "press 'stay on page' go reporting manager home";     }); }); 

regardless of option select navigated home.htm. there way can make dialog box ok button instead of default "leave page" or "stay on page" options?

or perhaps else make suggestion on hot better handle?

thanks

you cannot override styling of onbeforeunload dialog. believe me, tried before in earlier projects.

reference: http://msdn.microsoft.com/en-us/library/ms536907%28vs.85%29.aspx

it built browser object, , have no control on it.

you can set own dialog show when onbeforeunload event triggers, not disable regular 1 show. quite annoying, yes.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -