A
Andrew Poulos
The stuff I'm doing requires a number of writes to a db from a form
post. To make sure each form gets posted there's a setTimeout to
introduce a short delay.
When a user clicks the provided 'exit' button everything can happen in a
neat order but when the user click, say, the 'x' button on the title bar
I'm having trouble.
I'm using window.onbeforeunload to catch any exit that isn't via the
'exit' button and an alert pops up to notify the user and, hopefully,
give time (300ms) for the setTimeout to trigger.
Unfortunately only IE seems to stop the setTimeout from triggering. My
code looks a bit like this:
fUpdate = function() {
window.onbeforeunload = null;
fWriteData('notes', notes);
setTimeout("fWriteData('Limit', limit)",300);
alert("wait a mo");
self.close();
};
window.onbeforeunload = fUpdate;
How can I code so that IE will trigger a setTimeout on onbeforeunload?
Andrew Poulos
post. To make sure each form gets posted there's a setTimeout to
introduce a short delay.
When a user clicks the provided 'exit' button everything can happen in a
neat order but when the user click, say, the 'x' button on the title bar
I'm having trouble.
I'm using window.onbeforeunload to catch any exit that isn't via the
'exit' button and an alert pops up to notify the user and, hopefully,
give time (300ms) for the setTimeout to trigger.
Unfortunately only IE seems to stop the setTimeout from triggering. My
code looks a bit like this:
fUpdate = function() {
window.onbeforeunload = null;
fWriteData('notes', notes);
setTimeout("fWriteData('Limit', limit)",300);
alert("wait a mo");
self.close();
};
window.onbeforeunload = fUpdate;
How can I code so that IE will trigger a setTimeout on onbeforeunload?
Andrew Poulos