Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-20-2005, 06:24 PM   PM User | #1
rhettu
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rhettu is an unknown quantity at this point
How to create a 'Close page' message for unsaved web form data?

How can I generate a message "Do you really want to move away from this page? You have not saved your data changes" .

... when someone attempts to close a web form page via the Red-X button without submitting / saving thier data first?

Rhett
rhettu is offline   Reply With Quote
Old 03-20-2005, 07:57 PM   PM User | #2
suendisra
New Coder

 
Join Date: Mar 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
suendisra is an unknown quantity at this point
I'm not sure

I'd think that'd have to do with a more windows problem; like have CGI running in the background. However, if someone finds out, could you tell me as well? I could really use that...
suendisra is offline   Reply With Quote
Old 03-27-2005, 02:31 PM   PM User | #3
rhettu
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
rhettu is an unknown quantity at this point
Close Window Alert

Anyone know how to generate an alert if the page is being closed by the user, before saving data?
rhettu is offline   Reply With Quote
Old 03-27-2005, 02:56 PM   PM User | #4
glenmac
Regular Coder

 
Join Date: Nov 2003
Location: Vancouver Island Canada
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
glenmac is an unknown quantity at this point
Code:
<html> 
<head> 
<script language=javascript> 

function confirmit() 
{ 
event.returnValue = "Are you sure ??"; 
} 

</script> 
</head> 

<body onbeforeunload="confirmit();"> 

hahhahahhahaa 

</body> 
</html>
__________________
lantzvillecomputers.com
glenmac is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:26 PM.


Advertisement
Log in to turn off these ads.