![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveRe: How to check that a form has been changed
From: RobG <rgqld@iinet.net.au>
Date: Sun Apr 30 2006 - 14:09:56 CEST
Taras_96 wrote:
It depends on what you mean by 'changed'. Do you mean if any control
> This thread:
An alternative is to go through all the form controls and test if their
How you do the test depends on the type of element. Inputs of type
For select elements, test if the selected option's 'defaultSelected'
Another scheme is to always have the first control of any group selected
Another option is to use onload to create an object that stores the
> This technique seems to be a bit messy to me (I have many form
How to you expect to achieve that?
> and upons submission, doing a javascript equality comparison
In JavaScript, objects are only equal to themselves (I wish I had a
objectA == objectB
returns true; it will always return false. The statement will only be
> if(oldObject == document.getElementById('form'))
No - that is, it will not reliably test whether the form has been
-- RobReceived on Mon May 1 05:27:52 2006 |