Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamique textbox
Message
De
13/07/2001 10:35:49
 
 
À
13/07/2001 08:14:47
Christian Bellavance
Université du Québec à Hull
Hull, Québec, Canada
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00530160
Message ID:
00530240
Vues:
24
>Is there a way to do something like this in JScript:
>
>var tmp = "myTextBox"
>aler(document.myform." + tmp + ".value")
>
>I'll try to explain it. I have a variable which hold the name of the text box that I need to use. How can I use the value property of that text box?
>
>Thanks.

Try using eval, like this:
var tmp = "myTextBox"
alert(eval("document.myform." + tmp + ".value"))
//note that you were missing a double quote before 'document.myform'
That will work for you.
Andres M. Chiriboga, MCSE, MCP+I
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform