[Seaside] How to set default pushbutton? Re: How to set focus on text fields?

Michel Bany m.bany at wanadoo.fr
Mon Jun 12 05:34:53 UTC 2006


>Thanks, that worked for setting the focus on the input field.  Any
>suggestions for making the submit button the default pushbutton?
>
>  
>
Oops, sorry I only answered part of your questions.
I think something like this should do.

html form:
     [html defaultAction: [self buttonClicked].
     ...
     html submitButtonWithAction: [self buttonClicked] text: 'Accept'.
     ...
     ]

Can also be written like this

html formWithDefaultAction: [self buttonClicked] do:
     [
     ...
     html submitButtonWithAction: [self buttonClicked] text: 'Accept'.
     ...
     ]

With the canvas api, it would be something like this :

html form defaultAction: [self buttonClicked]; with:
     [	
     ...
     html submitButton callback: [self buttonClicked]; text: 'Accept'.
     ...
     ]

HTH
Michel.




More information about the Seaside mailing list