RE: [PHP] Detect if user has changed form data

2001-03-13 Thread PHPBeginner.com

no,

the JavaScript is the only way to do that.

When you close your browser JavaScript is what can do a check, PHP does
nothing - it's not in your browser - it's on the server.

Plus, with JavaScript this kind of things are much cooler.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Ide, Jim [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 10:15 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Detect if user has changed form data




Is there an easy way to detect if a user has changed
the values in the fields of an HTML form?  I want to
be able to check this during the onUnload event and
warn the user that he/she has not clicked the "Save"
button to save changes to the form fields.

The only way I can see to do this is to use JavaScript
to loop thru the variables and compare the current
(possibly changed) value to the value in the defaultValue
property.  I'm hoping that there is a "UserHasChangedFormVariables"
property (or something similar) that I don't know about that someone
will tell me about :)

A pointer to existing code that does this would be appreciated.

Many thanks -
Jim


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Detect if user has changed form data

2001-03-13 Thread Ide, Jim



Is there an easy way to detect if a user has changed
the values in the fields of an HTML form?  I want to
be able to check this during the onUnload event and
warn the user that he/she has not clicked the "Save"
button to save changes to the form fields.

The only way I can see to do this is to use JavaScript
to loop thru the variables and compare the current
(possibly changed) value to the value in the defaultValue
property.  I'm hoping that there is a "UserHasChangedFormVariables"
property (or something similar) that I don't know about that someone
will tell me about :)

A pointer to existing code that does this would be appreciated.

Many thanks -
Jim


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]