chuckster1
MIS
I want to pass a HTML object name to a function to perform the following task.
It won't work because I don't know how to set the reference to the object.
Javascript has the getElement command. Does vbscript has something similar?
Function AddOptionToSelectList(strSelectListName,strOptionValue, strOptionText)
Set objOption = document.CreateElement("OPTION"
objOption.Value = strOptionValue
objOption.Text = strOptionText
'PROBLEM OCCURS HERE
'strSelectListName can't be a varible. If I put the select
'list name in manually it works.
strSelectListName.add objOption
Set objOption = Nothing
End Function
It won't work because I don't know how to set the reference to the object.
Javascript has the getElement command. Does vbscript has something similar?
Function AddOptionToSelectList(strSelectListName,strOptionValue, strOptionText)
Set objOption = document.CreateElement("OPTION"
objOption.Value = strOptionValue
objOption.Text = strOptionText
'PROBLEM OCCURS HERE
'strSelectListName can't be a varible. If I put the select
'list name in manually it works.
strSelectListName.add objOption
Set objOption = Nothing
End Function