Results 1 to 2 of 2

Thread: Populating Combo Boxes ..Help!!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651

    Red face


    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
    Gilly

  2. #2
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243
    Hi,
    Populating Combo boxes in JavaScript is done like this:
    Code:
    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
    Web/Application Developer
    VB6 Ent (SP5), Win 2000,SQL Server 2000

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width