A
Andy Goldstein
I have a table where all the TRs have an onClick handler registered.
One (and only one) of the rows has 2 text input boxes, where each
textbox has an onChange handler registered. Both the onClick and
onChange handlers do some minor manipulation of form data (although
they work on different form elements). If the onChange event fires, I
need the form to be submitted. If the onClick event fires for a TR, I
also need the form to be submitted. What I am seeing is that if I
change the value in a text box, then click on a row, the onChange
handler runs, performs the form submission, and sometimes onClick also
runs and does a form submission as well. This leads to unpredictable
results.
Ideally I'd like some way to be able to execute onChange from start to
finish, then onClick from start to finish, then submit my form (just
once of course). So far I haven't figured out a way to do this. Does
anyone have any suggestions for how to accomplish this?
Thanks in advance,
Andy
One (and only one) of the rows has 2 text input boxes, where each
textbox has an onChange handler registered. Both the onClick and
onChange handlers do some minor manipulation of form data (although
they work on different form elements). If the onChange event fires, I
need the form to be submitted. If the onClick event fires for a TR, I
also need the form to be submitted. What I am seeing is that if I
change the value in a text box, then click on a row, the onChange
handler runs, performs the form submission, and sometimes onClick also
runs and does a form submission as well. This leads to unpredictable
results.
Ideally I'd like some way to be able to execute onChange from start to
finish, then onClick from start to finish, then submit my form (just
once of course). So far I haven't figured out a way to do this. Does
anyone have any suggestions for how to accomplish this?
Thanks in advance,
Andy