Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for a text box on a page
Message
De
03/08/2001 10:02:20
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
 
 
À
02/08/2001 10:38:12
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00538753
Message ID:
00539361
Vues:
30
Your solution works great! I was counting for the number of objects on the form like this:

if (document.MYFORMNAME.length == 6)

then set focus to the correct text box. The problem with my method is if I later add or remove an object, then my code breaks unless I remember to change the above line.

Your answer is the better solution.

Thanks,

Jerryt



>This is on the client side right?
>
>Try this:
>
if (document.MYFORMNAME['txt_part']){
>  document.MYFORMNAME['txt_part'].focus();
>}
>I may have missed the exact syntax (I'm just getting started on JS) but you get the idea.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform