|
-
Mar 3rd, 2006, 03:09 PM
#1
Thread Starter
Hyperactive Member
Advice on how to prompt for saving edits
I want to pick your collective brains on how to do something:
I have a page that has about 10 fields for display/edit.
If a user edits any of the data in any way, and trys to navigate away before saving I want a message to display saying "would you like to save your edits, yes (saves), no ignores.
Is there an easy way to do this?
-
Mar 3rd, 2006, 03:12 PM
#2
Re: Advice on how to prompt for saving edits
For your body tag:
onbeforeunload="RunBeforeUnload()"
Then, make a function called RunBeforeUnload() that returns true if the page should navigate away or false if it should not.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Mar 3rd, 2006, 03:13 PM
#3
Re: Advice on how to prompt for saving edits
Or instead of true/false you can force a postback to occur if that's your thing.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Mar 3rd, 2006, 03:57 PM
#4
Thread Starter
Hyperactive Member
Re: Advice on how to prompt for saving edits
Thanks I'll play with it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|