Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: TC 5.5.15 - Internet Explorer firing multiple form submits? -
Solution - thanks

Frank McLean

2006-12-15


Thanks Chris, that works. I think this used to be a simple button,
rather than a submit.

Sincerely,

Frank McLean

Christopher Schultz wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Frank,
>
>Frank McLean wrote:
>
>
>>I have a couple of submit buttons similar to the following:
>>
>><html:submit value='Update stuff'
>>onclick='mode.value=2;document.forms[0].submit()'/>
>>  
>>
>
>Your javascript is causing the "multiple submit" behavior. You need to
>change your onclick handler to this:
>
>onclick="mod.value=2; document.forms[0].submit(); return false;"
>
>If you don't have the "return false" at the end, then the default action
>is still performed (which, for a SUBMIT button is to submit the form).
>So, you have one form submission coming from your javascript trigger,
>and another that the browser is performing because you didn't tell it
>not to do so.
>
>- -chris
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.6 (MingW32)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iD8DBQFFgYQd9CaO5/Lv0PARAnTMAJ9Wyng82bTPmmwxf0X+Pt3wnM5+2QCcDDk4
>VhnqR0cEZZI2B1z3girjzdk=
>=YOwr
>-----END PGP SIGNATURE-----
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@(protected)
>To unsubscribe, e-mail: users-unsubscribe@(protected)
>For additional commands, e-mail: users-help@(protected)
>
>
>
©2008 junlu.com - Jax Systems, LLC, U.S.A.