Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for a text box on a page
Message
From
03/08/2001 10:02:20
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
02/08/2001 10:38:12
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00538753
Message ID:
00539361
Views:
31
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform