--
Posted via CNET Help.com
http://www.help.com/
set objOption = document.createElement ("OPTION")
objOption.text = "My Text"
objOption.value = "MyValue"
frmForm.cboCombo.add (objOption)
window.alert document.url
</script>
it works very well.I am very glap to have your help , thanks again!
best regards
You first need to create the <option> object.
Set objOpt = document.createElement("OPTION")
Specify the value and text to the Option Object
objOpt.value ="Value1"
objOpt.text = "Text"
objOpt.Id = "ID"
Then to add that particular Option Object, add to the Select Object
SomeSelectObject.options.add(objOpt)
Hope this helps,
Mark Holman
snake <px...@yahoo.com> wrote in message
news:s5gg4rk...@corp.supernews.com...
> hello
> Would you mind tell me how to add item in listbox ( HTML
> <SELECT></SELECT> ) in vbscript.I had used the <listboxname>.add(item,)
> function to add some item in the listbox,but the <item> can not be a
> string ,and I don't know how to create a item object in vbscript .
> Thanks in advance.