[Seaside] Setting focus on Input field in form

Avi Bryant avi at beta4.com
Tue Mar 16 01:10:56 CET 2004


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?



More information about the Seaside mailing list