[Seaside] Making a defined text input have the default focus

Boris Popov boris at deepcovelabs.com
Thu May 10 18:08:40 UTC 2007


If you look at the implementation you'll notice it basically adds a small javascript snippet at the bottom of the page so that when your page finishes loading the focus is set to the field you specify. I imagine you can just try,

html script: 'setFocus(' , brush id printString , ')'

instead when you're creating content for updater. If that works, extract into something that's nicer and more reusable ;)

-Boris

-- 
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

boris at deepcovelabs.com

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> bounces at lists.squeakfoundation.org] On Behalf Of Sebastian Sastre
> Sent: Thursday, May 10, 2007 11:05 AM
> To: 'Seaside - general discussion'
> Subject: RE: [Seaside] Making a defined text input have the default focus
> 
> Thanks Boris! For the login and other simple forms it did the trick. I
> have
> this other component with a periodical updater that every N seconds
> refreshes some div (the input is in another div outside it) that is
> ignoring
> the focus set. Do you know about #setFocus effect beign neutralized by an
> updater scritp?
> 
> Regards,
> 
> Sebastian
> 
> 
> > -----Mensaje original-----
> > De: seaside-bounces at lists.squeakfoundation.org
> > [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre
> > de Boris Popov
> > Enviado el: Miércoles, 09 de Mayo de 2007 20:05
> > Para: Seaside - general discussion
> > Asunto: RE: [Seaside] Making a defined text input have the
> > default focus
> >
> > (html textInput)
> >   setFocus;
> >   size: 16;
> >   value: self username;
> >   callback: [:v | self username: v]
> >
> > -Boris
> >
> > --
> > +1.604.689.0322
> > DeepCove Labs Ltd.
> > 4th floor 595 Howe Street
> > Vancouver, Canada V6C 2T5
> > http://tinyurl.com/r7uw4
> >
> > boris at deepcovelabs.com
> >
> > CONFIDENTIALITY NOTICE
> >
> > This email is intended only for the persons named in the
> > message header. Unless otherwise indicated, it contains
> > information that is private and confidential. If you have
> > received it in error, please notify the sender and delete the
> > entire message including any attachments.
> >
> > Thank you.
> >
> > > -----Original Message-----
> > > From: seaside-bounces at lists.squeakfoundation.org [mailto:seaside-
> > > bounces at lists.squeakfoundation.org] On Behalf Of Sebastian Sastre
> > > Sent: Wednesday, May 09, 2007 3:59 PM
> > > To: 'Seaside - general discussion'
> > > Subject: [Seaside] Making a defined text input have the
> > default focus
> > >
> > > Hi there,
> > >
> > >     anybody knows how one can make that a component's form (only one
> > in
> > > this case) have one of it's input fields with focus so user
> > can start
> > > typing on that component's load instead of having to click on it
> > first?
> > >
> > >     thanks,
> > >
> > > Sebastian Sastre
> > >
> > >
> > _______________________________________________
> > Seaside mailing list
> > Seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list