tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: TC 5.5.15 - Internet Explorer firing multiple form submits?
Date Thu, 14 Dec 2006 17:04:29 GMT
-----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@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message