[Seaside] Setting focus on Input field in form
Brett Taylor
brett.taylor at healthauditors.com
Tue Mar 16 02:14:02 CET 2004
Avi,
The following ended up working in I.E 6 & Mozilla 1.X
UserRegistrationForm>>script
^'function setFocus() {
var elem = document.getElementById("<1s>");
elem.focus();}' expandMacrosWith: self focusFieldName
Note: I'm using VisualWorks
Thanks,
Brett
On Mon, 2004-03-15 at 16:10, Avi Bryant wrote:
> On Mar 15, 2004, at 3:57 PM, Brett Taylor wrote:
>
> >
> > UserRegistrationForm>>script
> > ^'function setFocus() { document.entryForm.4.focus();}'
>
> Just guessing, but is it possible that "4" doesn't work as an attribute
> name that way? Would entryForm["4"] work any better, I wonder, or some
> variation on that?
>
> Note also that in the long run it's not a good idea to rely on the name
> of a form element, since it'll change with the slightest provocation.
> There's probably some way to find the right element through id instead,
> no? Any DOM experts out there?
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>
More information about the Seaside
mailing list