[Javascript] Setting the focus to form elements

dev at qroute.net dev at qroute.net
Wed Jul 7 14:22:47 CDT 2004


I think radio and select and checkboxes fail, their object set does not
msupport the setfocus property.
Tabbing will not halp. Imagine you fill out a form, you click submit,
validation test reports country field left blank, if would be nice to set
the focus to country by scrolling there autmatically. It's more
user-friendly than telling user to find where the country is.
----- Original Message ----- 
From: "Troy III Ajnej" <trojani2000 at hotmail.com>
To: <javascript at LaTech.edu>
Sent: Wednesday, July 07, 2004 12:13 PM
Subject: RE: [Javascript] Setting the focus to form elements


>
> You don't scroll, you progressively TAB to it.
> or have you tried: somechckbox.focus() command through js, it will work
100%
> sure, but I never try-ed it.
>
> >From: <dev at qroute.net>
> >Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
> >To: "[JavaScript List]" <javascript at LaTech.edu>
> >Subject: [Javascript] Setting the focus to form elements
> >Date: Wed, 7 Jul 2004 11:58:48 -0700
> >
> >Not all form elements can receive a focus, checkbox foir example. Do you
> >have a trick to overcome that when you need to scroll to that element as
a
> >result of a form validation ?
> >
> >_______________________________________________
> >Javascript mailing list
> >Javascript at LaTech.edu
> >https://lists.LaTech.edu/mailman/listinfo/javascript
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list