Pressing ENTER, form buttons and tabindex attributes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Pressing ENTER, form buttons and tabindex attributes

Jos Vos
Hi,

I have the problem that pressing the ENTER key acts as if the
first button on the form is pressed, which I don't want.

Now I tried to add xhtml:tabindex attributes to xforms:submit
elements, without any success so far.  Should this work?

What is the correct way (or isn't there one?) to make sure
pressing ENTER does not activate buttons I do not want?

Thanks,

--
--    Jos Vos <[hidden email]>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Pressing ENTER, form buttons and tabindex attributes

Erik Bruchez
Administrator
Jos,

Is this with XForms Classic or NG? With NG, the ENTER key can be
captured with the DOMActivate event on <xforms:input>, and should
certainly not submit the form unless you explicitly perform an
<xforms:send>.

-Erik

Jos Vos wrote:

> Hi,
>
> I have the problem that pressing the ENTER key acts as if the
> first button on the form is pressed, which I don't want.
>
> Now I tried to add xhtml:tabindex attributes to xforms:submit
> elements, without any success so far.  Should this work?
>
> What is the correct way (or isn't there one?) to make sure
> pressing ENTER does not activate buttons I do not want?
>
> Thanks,
>
> --
> --    Jos Vos <[hidden email]>
> --    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
> --    Amsterdam, The Netherlands        |     Fax: +31 20 6948204



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Pressing ENTER, form buttons and tabindex attributes

Jos Vos
On Wed, Jan 18, 2006 at 04:15:30PM +0100, Erik Bruchez wrote:

> Is this with XForms Classic or NG? With NG, the ENTER key can be
> captured with the DOMActivate event on <xforms:input>, and should
> certainly not submit the form unless you explicitly perform an
> <xforms:send>.

It's with Classic (OPS 2.8).

--
--    Jos Vos <[hidden email]>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Pressing ENTER, form buttons and tabindex attributes

Jos Vos
In reply to this post by Erik Bruchez
On Wed, Jan 18, 2006 at 04:15:30PM +0100, Erik Bruchez wrote:

> Is this with XForms Classic or NG? With NG, the ENTER key can be
> captured with the DOMActivate event on <xforms:input>, and should
> certainly not submit the form unless you explicitly perform an
> <xforms:send>.

Is there any solution I can use with OPS 2.8 to avoid that pressing
ENTER submits a form in a way I do not want (i.e., as if the first
button in the form was pressed)?

--
--    Jos Vos <[hidden email]>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Pressing ENTER, form buttons and tabindex attributes

Erik Bruchez
Administrator
Jos Vos wrote:

> On Wed, Jan 18, 2006 at 04:15:30PM +0100, Erik Bruchez wrote:
>
>> Is this with XForms Classic or NG? With NG, the ENTER key can be
>> captured with the DOMActivate event on <xforms:input>, and should
>> certainly not submit the form unless you explicitly perform an
>> <xforms:send>.
>
> Is there any solution I can use with OPS 2.8 to avoid that pressing
> ENTER submits a form in a way I do not want (i.e., as if the first
> button in the form was pressed)?
I don't think we do anything special with Classic, so my guess is that
you are seeing the browser's default behavior. You should be able to
intercept the event with JavaScript.

-Erik




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws