Yep.
Have the submit/save button as a WOActiveButton and the cancel/reset
button as a WOImage wrapped in a WOHyperlink. In my application I
have a lot of forms and have a cancel button on the left and a save
button on the right. Since the cancel is first in the html, it was
always cancelling on the enter key. This is a workaround to have a
"default button" type setup.
HTH,
Greg
On 27/05/2005, at 9:42 AM, Jake Macmullin wrote:
> The enter key will default to the *first* submit button within a
> form. This isn't specific to WO. One way to get the enter key to
> default to a particular action would be to have a hidden button
> that calls that action as the first button in the form.
>
> If anyone has a nicer solution to this - I'd be keen to know about it.
>
> Regards,
>
> Jake MacMullin
>
>
> On 27 May 2005, at 2:32 AM, Valerio Luccio wrote:
>
>
>> Hi,
>> this might have already been answered in the past, but I don't
>> remember. I would like to bind the enter key to a specific action
>> on a page. Currently in my app, if you fill a field and then hit
>> the enter key, the action being executed is the one associated
>> with the first button in the form. I could put at the top of the
>> form an invisible button and associate that with the action I
>> want, but a) it's ugly and b) I use a common header for all my
>> pages and I need to be able to specify different action for
>> different pages (yes, I could create a default action that calls
>> the action for that specific page, but that's even uglier).
>>
>> Thanks,
>>
>> --
>> Valerio Luccio (212) 998-8736
>> Center for Brain Imaging 4 Washington Place, Room 158
>> New York University New York, NY 10003
>>
>> "In an open world, who needs windows or gates?"
>>
>>
>
>
This archive was generated by hypermail 2.0.0 : Thu May 26 2005 - 20:23:48 EDT