Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
JavaScripting
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00304641
Message ID:
00304706
Views:
33
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform