cool,
Please help me to work with beforeunload event
var testClass = new Class({
initialize: function() {
this.onLoad();
},
onLoad: function() {
this.closeForm();
},
closeForm: function() {
window.addEvent('beforeunload', function(event){
event.stop(); /// it does not work
this.showMsg();
}.bind(this));
},
showMsg: function() {
.....
}
});
//---------------------------------
window.addEvent('beforeunload', function(event){
* event.stop(); /// it does not work*
this.showMsg();
}.bind(this));
--
Best regards,
Sitthykun LY