detect where a redirect wants to go with jQuery
- by Markus
Hi there,
I have a page with a flash plugin. If I'm on that page, I don't want to post a message if the user wont to leaf it without saving it...:
if(/containers/.test(document.location.href)){
window.onbeforeunload = function(){
return exit_text;
};
}
This works fine, except that I if i save the content in the flash plugin. In that case I don't want to show up that message. How can I detect the url within the onbeforeunload method? That way I can descide when to post the method!
Thanks
Markus