Before opening the window, I must call the jquery ajax () function in my case, in this one post and I return results Do not care, I just want to update a database.
Then the response starts to bind the function to the unload event, i.e. use the jquery utility () function, and that function creates an AJAX call. Also, I know that you should add synchronous parameters to the phone. In other words, add async: wrong jquery ajax () call.
However, I have tried to do all this and it does not work on IE8! I've tested it several times and it works just fine in Firefox and Chrome just will not work on IE8
Even stranger is that when I turn off the entire IE8 app, it seems that is done through the call! Is it being cached?
Therefore others are suggesting to bind AJAX beforeunload using jquery bind (). However there are some mixed answers on whether it will work on all browsers.
I have not tried so far because it seems like the "hack" way of doing this. However, if this works, then I really do not care as much as it does.
Can not you call the function in body tags of the page?
& lt; Body onbeforeunload = "funcName (param)" & gt; This way every time the page gets unloaded, it calls your function and you do not have to worry about binding.
Comments
Post a Comment