Hi Friends,

I have a web Application created, there is an option to Add/Edit the forms.
My requirement is something like...
When a user opens any record for editing, the details are displayed(binded) in texboxes,dropdowns,radiobuttons.. etc
Here if the user modifies any data and clicks on any other link(within the same page) to move onto some other page without saving... promt him saying "You have modified the data, Do you wish to continue without saving Yes/No".

Any help is greatly appreciated...

Thanks

well, you can use a flag..
set the flag to one on click of "submit button" and otherwise let it be zero....

and onclick of each link call a function check()
which see's if the flag is 0 gives an alert otherwise
opens the link...

use can also compare the values in the databases and the current values in the textboxes and listboxes and see if the have changed !

thanks ashish for your post

I want to alert the user only if he modified some of the data(may be a character) and trying to move on other links.. otherwise let him go if no changes made... and by comparing the data from DB will take too long time to process...

Did you work out on that issue? Post your code.

Thank you friends form your replies...
hey mail2saion.. your link really helps..
I got the solution

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.