Ah - so I switch it back to a submit button and register an onSubmit
handler.
Thanks. :-)

-----Original Message-----
From: Arron Bates [mailto:struts-user@;keyboardmonkey.com]
Sent: Friday, November 15, 2002 20:44
To: [EMAIL PROTECTED]
Subject: Re: enter enable [WAS: RE: enter disable]


err...

The "onSubmit" handler in your form tag.
Before the form is sent at all, this will be called whether you've hit
enter and image submit or whatever.

Return false from this script, then it will not process the form at all.
Return true, and it will play like normal.


Arron.

On Fri, 2002-11-15 at 23:40, Andrew Hill wrote:
> Funnily enough I have the opposite problem.
> I have a form that now uses a button or sometimes a link instead of a
> submitButton to submit the form as it needs to do some stuff in javascript
> prior to submission (including playing silly buggers with the forms action
> property!).
> This works fine except that in dropping the submit in favour of a plain
> button Ive lost the 'submit on enter' behaviour.
> How might I get it back while still being able to do my js stuff when the
> user submits the form - including via 'enter'.?
>
> -----Original Message-----
> From: Gemes Tibor [mailto:gemes@;regens.hu]
> Sent: Friday, November 15, 2002 20:28
> To: Struts Users Mailing List
> Subject: Re: enter disable
>
>
> 2002. november 15. 13:06 dátummal Gus Delgado ezt írtad:
> > How can I disable the <htm:text tag so that nothing will happen when the
> > use hits the enter key. The way it works right now everytime you hit the
> > enter key in a text field it tries to submit the request.  any flags
> > that need to be turn off?
>
> delete the submit button, put on a button which submits the form onClick.
> This way you workaround the default (which is rather handy on the other
> hand)
>
> Tib
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@;jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to