choosing the submit for Enter in a textfield?
choosing the submit for Enter in a textfield?
- Subject: choosing the submit for Enter in a textfield?
- From: ocs--- via Webobjects-dev <email@hidden>
- Date: Sun, 26 Mar 2023 23:05:58 +0200
Hi there,
I've got a form (combined from more separate components) whose overall layout is
<wo:form><!-- ERXWOForm.multipleSubmitDefault=true -->
... lots of inputs incl. a number of textfields ...
<!-- [1] -->
<wo:textfield value="$bar"/>
<wo:submit action="$barAction"/>
... other inputs and textfields ...
<wo:submit action="$fooAction"/>
</wo>
I would need that an Enter in the "bar" textfield triggers "barAction"; an
Enter in any other textfield triggers "fooAction".
Can this be done in a clean, preferably non-JS way?
I've found that I can put an invisible submit/fooAction at the place of [1], in
which case _all_ Enters in _all_ textfields trigger "fooAction", but I haven't
been able to find any nice way to ensure an Enter in the "bar" textfield
triggers "barAction". With JS, I can do that, but it is really darn ugly (and
besides it wouldn't work if the user switches off JS for security).
Thanks a lot!
OC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden