Results 1 to 2 of 2

Thread: Dynamic List Box in ASP

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Location
    India
    Posts
    33

    Red face

    I have two combo boxes. The first one has fixed data values but depending on what is selected from the first combo box I have to pick values from SQL Server and show in the second box.

    Basically I want to know if we can delete and add values to a combo box through java script.

    Thanks.

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    It is easy to do (once you know how to do it).

    You will need to use server side code to populate client side arrays when the page first loads with all records that 'could' be put into the second combo box and make sure you have a key field that links the array member to the value (key) from the first combo box.

    Another, method with less coding is to refresh the page on change from the 1st combo box and simply load the recordset with the new data.
    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..

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