|
-
Apr 27th, 2001, 09:34 PM
#1
Thread Starter
Addicted Member
add items to listbox with vbscript
the html listbox doesn't seem to have vb's .additem method. how do i add items w/ vbscript?
Brian
Programming: VB5 Pro (SP3) - QBasic 1.1,4.5
Internet: HTML 4, CSS, JavaScript
Visit AltInt.com!
-
Apr 27th, 2001, 09:52 PM
#2
Im not sure but try .value.additem, "string"
-
Apr 27th, 2001, 11:14 PM
#3
Thread Starter
Addicted Member
that doesnt seem to work.
thanks anyway
Brian
Programming: VB5 Pro (SP3) - QBasic 1.1,4.5
Internet: HTML 4, CSS, JavaScript
Visit AltInt.com!
-
Apr 28th, 2001, 02:56 PM
#4
Frenzied Member
Here it is in Javascript:
Code:
var colOptions = frmMyForm.lstMyList.options;
var objOption;
objOption = document.createElement("OPTION");
colOptions.add(objOption);
objOption.innerText = 'Added Item';
objOption.value = '7';
If you need it in VBScript, lemme know... it's very similar
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Apr 28th, 2001, 08:17 PM
#5
Thread Starter
Addicted Member
humm, i can't quite translate it. i would appreciate the vbs version
Brian
Programming: VB5 Pro (SP3) - QBasic 1.1,4.5
Internet: HTML 4, CSS, JavaScript
Visit AltInt.com!
-
Apr 29th, 2001, 11:26 AM
#6
Thread Starter
Addicted Member
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
Brian
Programming: VB5 Pro (SP3) - QBasic 1.1,4.5
Internet: HTML 4, CSS, JavaScript
Visit AltInt.com!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|