fpoyavo
asked on
Button page refresh
Hi Experts,
I have button on my page which has this code
$('#Button1').click(functi on() {
location.reload();
});
The problem is that in IE8-9 it prompts popup if I would close this tab.
Is there workaround this issue ?
Thanks.
I have button on my page which has this code
$('#Button1').click(functi
location.reload();
});
The problem is that in IE8-9 it prompts popup if I would close this tab.
Is there workaround this issue ?
Thanks.
ASKER
Gary,
Same thing. "The page you are viewing is trying to close this tab. Would like to close or continue?"
That's odd....
Same thing. "The page you are viewing is trying to close this tab. Would like to close or continue?"
That's odd....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes I do. It actually closes child windows but why do you think they are related ? if so how do I keep both ?
ASKER
You are right man !!!
It's nothing to do with the page you are reloading, its the child windows closing that is firing the alert.
That's not really an answer...
What you would need to do is close the child windows in the button click code, then you shouldn't get any alerts.
What you would need to do is close the child windows in the button click code, then you shouldn't get any alerts.
ASKER
I have no opened child windows at the time when I click this button to refresh.
Are you reloading the page or closing it?
Instead of location.reload() try
window.location.href = window.location.href