Timer control stopping in onbeforeunload event
I have a timer control on my trivia website.I use this code in onbeforeunload event to prevent users to refresh page, vs:
function onBeforeUnloadAction()
{
event.returnValue = "You competition is going to end. Are you sure?";
}
but I have problems with it. these are;
1) my timer is stopping. I dont want it to stop. it has to keep counting down when a user clicks refresh button or back button of IE vs.
2) and when a user clicks OK in the dialog box which comes by clicking Refresh button, i want it to go to an another page but i dont know how to handle it.
3) when time is 0, it has to go to an another page which finishes the competition but onBeforeUnloadAction event fires itself because of i redirect to another page.
Please help me, I worked a lot on my page. that is my biggest problem. I need to solve it.
Thanks. Have a nice day...

