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

From: Date: Tue, 13 Mar 2001 15:31:34 +0000
Subject: RE: [PHP] Detect if user has changed form data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43666@lists.php.net to get a copy of this message
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) maxim@phpbeginner.com www.phpbeginner.com -----Original Message----- From: Ide, Jim [mailto:jide@lgb-inc.com] Sent: Tuesday, March 13, 2001 10:15 PM To: 'php-general@lists.php.net' 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#43666) next »