• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

Simple Question

Hi Experts, I have created a list cob/Combo Box (Select and Option Tags)
  for a textfield, using VBScript, I can retrieve the data by
  document.FormName.elements(1).Value
 so for a combo/list box, how should I retrieve ?
Thanks
0
seahpc
Asked:
seahpc
1 Solution
 
sybeCommented:
document.form_name.field_name.options[document.form_name.field_name.selectedIndex].value

Or if you use an 'onChange":

onChange="MyFunction(this.options[this.selectedIndex].value)"
0
 
seahpcAuthor Commented:
I found the answer a bit different from yours :
document.form_name.field_name.optionsCdocument.form_name.field_name.selectedIndex).text
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now