Close Confirmation

  • Thread starter Thread starter James Doughty
  • Start date Start date
J

James Doughty

Hello,

I am trying to circumvent my users from closing a page as much as possible.
I they decided to close then so be it but I want to give them a message
telling them they need to continue to finish the process.
I tried to add it to the onunload event but that event is fired on a
postback as well as the close. Is there a way to tell if this is a postback
vs a close event?

Thanks,
James
 
James,

You can try using window.event.srcElement to find out what object fired the
event.

Eliyahu
 
Eliyahu,

That was a good thought but it's comes back as undefined either way, but
I did discover something interesting the clientX and clientY are < -9000
for the Close window button. I should be able to use this as indicator,
but if anyone has more ideas or more info about the clientX&Y < -9000 I
would appreciate it.

Thanks,
James Doughty
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top