Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
JavaScripting
Message
 
À
16/12/1999 09:48:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00304641
Message ID:
00304706
Vues:
32
>I need some help extracting a value from a dropdown using javascript.
>
>I have some values (ie jasonhall123, hellothere923, goodmoring838)
>
>What I need is some Javascript code that will return the three numbers. All values that have the numbers in them, are not the same length.
>
>Thanks in advance

Use the select object's "options" array to reference each option value.

ie:
Assuming the reference to the select object is in SEL1

lOptValue1 = SEL1.options[0].value
lOptValue2 = SEL1.options[1].value
lOptValue3 = SEL1.options[2].value....

You could also return the number of options using "SEL1.length" then loop through the options array to return the values.
Michael McLain
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform