the html listbox doesn't seem to have vb's .additem method. how do i add items w/ vbscript?
Printable View
the html listbox doesn't seem to have vb's .additem method. how do i add items w/ vbscript?
Im not sure but try .value.additem, "string"
that doesnt seem to work.
thanks anyway
Here it is in Javascript:
If you need it in VBScript, lemme know... it's very similarCode:var colOptions = frmMyForm.lstMyList.options;
var objOption;
objOption = document.createElement("OPTION");
colOptions.add(objOption);
objOption.innerText = 'Added Item';
objOption.value = '7';
humm, i can't quite translate it. i would appreciate the vbs version
Thanks
I missed the second Set somehow (when I was trying to make the JScript work)
Now it wrapped up in a nice little sub, so I can add items impulsively :)
Thanks again