Or just set a JS flag when the page loads to, say, false. Whenever any formfield is 
changed then set this flag to true.
Recommend writing wrappers for all your common form components (cf_input, cf_select, 
etc.) and encapsulating the requisite change detection logic in those.

Steve

> -----Original Message-----
> From: Rich Wild [mailto:[EMAIL PROTECTED]
> Sent: 24 September 2003 09:51
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ cf-dev ] OT : Detecting Form Changes
> 
> 
> nope, but why don't you try writing your own. Not too hard.
> 
> You can do it 2 ways
> 
> 1st: have alongside all your form items duplicates of those 
> form items in
> hidden form. When the form is submitted, check if
> document.myForm.myField.value == 
> document.myForm.myField_hidden.value - if
> its not the same then the form field has changed.
> 
> 2nd: load all of the form values into JS vars onLoad and then 
> check eg:
> myField = document.myForm.myField.value
> 
> then onsubmit, check the current value against the global JS var:
> 
> if (document.myForm.myField.value != myField) {
>       // field value has changed since onLoad
> }
> 
> then do whatever you need to do after.
> 
> > -----Original Message-----
> > From: Robertson-Ravo, Neil (RX)
> > [mailto:[EMAIL PROTECTED]
> > Sent: 24 September 2003 09:47
> > To: '[EMAIL PROTECTED]'
> > Subject: [ cf-dev ] OT : Detecting Form Changes
> > 
> > 
> > Anyone got any good JS scripts which, on submit, detect of a 
> > form has been
> > changed since it has been loaded?
> > 
> > 
> > -- 
> > ** Archive: 
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
> 


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to