I have a simple single record form which includes a number of fields, and a user defined button. The button simply saves a value to a global variable. The first field (which has focus) has a javascript onChange event attached - right now all this does is call a javascript method, and all the method does is display an alert(). The form loads and displays with the details of the first record. Assume my first action is to click on the user defined button (without changing any data)… the onChange event for the first field immediately fires - I get the alert message - before the button logic is executed.
I do not understand why the onChange is firing when I have not changed anything. Seems to me the event fires onBlur with the field, but then does no checking to see if anything has actually changed.
I deleted the javascript code and implemented an AJAX onChange event. Again, my first action is to just click on the button, and again onChange fires.
What am I doing wrong? Or is this a bug?
Any ideas on a work-around?