[thelist] JS: Calling forms submit action if there is a form element with the same name

.jeff jeff at members.evolt.org
Thu Dec 12 13:42:01 CST 2002


joshua,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Joshua Olson
>
> And if there are multiple buttons named submit?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

oForm.submit[0].click();

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> Or the submit button has a onclick handler that we want
> to avoid?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

set a flag previous to calling the click() method.  check the flag prior to
running any other logic inside the function called by the onclick event
handler.  either that or redesign and think about 1) why you need to call
the sumit() method and 2) why you need the onclick event handlers on the
submit button(s).

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/




More information about the thelist mailing list