Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
JS: page exit confirm does not work in Opera
Hi,
without much of the background, I need the following JS code to work in Opera. It does output a confirm with thetext variable as the message in IE, FF and Chrome (all on Win XP). But I also need this to work in Opera. Please help.
This is the app the function is for http://a-group.com.ua/viz/ (you design your house, and the function prevents exit without saving).
Here is the function code:
More tech data can be provided if needed. Thanks a lot.
without much of the background, I need the following JS code to work in Opera. It does output a confirm with thetext variable as the message in IE, FF and Chrome (all on Win XP). But I also need this to work in Opera. Please help.
This is the app the function is for http://a-group.com.ua/viz/ (you design your house, and the function prevents exit without saving).
Here is the function code:
function exitAlert()
{
if(window.event) {
window.event.returnValue = thetext;
} else {
e.preventDefault();
}
return thetext;
}
More tech data can be provided if needed. Thanks a lot.
Tagged:
1
Comments
http://chetzit.com/blog/jquery/7.html
Looks like Opera does not support onbeforeunload event? Can anyone confirm that?
Later: http://www.opera.com/support/kb/view/827/ Opera confirms it. Offers soluttion:
var omode='compatible'; history.navigationMode = omode; opera.setOverrideHistoryNavigationMode(omode);
testing ...
The script is here http://a-group.com.ua/basecamp/confirmleave.js ..
please help!