Click to See Complete Forum and Search --> : Populating Combo Boxes ..Help!!
gilly
Aug 18th, 2000, 04:56 AM
Does anyone have any code for populating a single combo box on an ASP page(Possibly using Javascript)?
The code i have works fine in the backend VB FORM, however im not sure how to transfer this code onto an ASP page??
Thanks
S@NSIS
Aug 18th, 2000, 05:09 AM
Hi,
Populating Combo boxes in JavaScript is done like this:
document.Form1.ComboBox1.length = 3; //Replace 3 with how many elements you require - 1
// Then populate the box.
document.Form1.ComboBox1.options[0].text = "First Option";
document.Form1.ComboBox1.options[1].text = "Second Option";
document.Form1.ComboBox1.options[2].text = "Third Option";
// etc....
Hope this helps,
Shaun
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.