bluesource
August 20th, 2009, 03:33 PM
var win = window.open(page,'window','width=270, height=155, left=300, top=200');
alert('1');
win.onunload = function()
{
alert('2');
}
Consider the above code:
In firefox, I see the new window popup, get a '1' alert, then close the popup window, then see the '2' alert.
In chrome, I see the new window popup, get a '1' alert, then additionally get the '2' alert immediately following the '1'.
When I close the chrome window I get no alerts.
What is the reason for this and how can I resolve this issue?
alert('1');
win.onunload = function()
{
alert('2');
}
Consider the above code:
In firefox, I see the new window popup, get a '1' alert, then close the popup window, then see the '2' alert.
In chrome, I see the new window popup, get a '1' alert, then additionally get the '2' alert immediately following the '1'.
When I close the chrome window I get no alerts.
What is the reason for this and how can I resolve this issue?