Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alert user when navigating away from page 1

Status
Not open for further replies.

SurvivorTiger

Programmer
Jul 9, 2002
265
0
0
US
Hi everyone,

I have a page where users can modify certain data and upon clicking "Submit", the data will get saved. But if they click on any other links on the page, they will lose their changes made to the data. So i want a message box to pop up and say something like "are you sure you want to exit without saving your data" with a "Yes/No" or "Ok/Cancel" button. if the user clicks No or Cancel they'll remain on that page, otherwise they lose their data and will be taken to another page. So, can someone please tell me how to do this?

Thanks
 
I wrote an FAQ (in the FAQ section - link near the top of the page) on how to do this:

faq216-6708

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top