Dynamic selct box from another select box

Discussion in 'ASP General' started by Robin, Apr 9, 2004.

  1. Robin

    Robin Guest

    First, let me apologize, I'm sure this has been posted before but I'm having
    trouble finding a good source of information.

    Ok ... I have a <SELECT> which is pulling a list of User Type's. Depending
    on what user type get's selected I want to bring up another <SELECT> which
    will display all of the available selections for that usertype ... i.e. If
    user type = Customer, then the second select box would bring up a list of
    Customers to select from.

    Any help much appreciated.
     
    Robin, Apr 9, 2004
    #1
    1. Advertising

  2. http://www.aspfaq.com/2270

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "Robin" <> wrote in message
    news:AmBdc.4078$...
    > First, let me apologize, I'm sure this has been posted before but I'm
    > having
    > trouble finding a good source of information.
    >
    > Ok ... I have a <SELECT> which is pulling a list of User Type's.
    > Depending
    > on what user type get's selected I want to bring up another <SELECT> which
    > will display all of the available selections for that usertype ... i.e. If
    > user type = Customer, then the second select box would bring up a list of
    > Customers to select from.
    >
    > Any help much appreciated.
    >
    >
    >
     
    Aaron Bertrand [MVP], Apr 9, 2004
    #2
    1. Advertising

  3. Robin

    Robin Guest

    Thank you! You're right, it is more of a JavaScript question. Thanks for
    the tip on Arrays


    "Peter Foti" <> wrote in message
    news:...
    > "Robin" <> wrote in message
    > news:AmBdc.4078$...
    > > Ok ... I have a <SELECT> which is pulling a list of User Type's.

    > Depending
    > > on what user type get's selected I want to bring up another <SELECT>

    which
    > > will display all of the available selections for that usertype ... i.e.

    If
    > > user type = Customer, then the second select box would bring up a list

    of
    > > Customers to select from.

    >
    > After the first selection is made, is the selection sent to the date?

    That
    > is, will the form be submitted? If so, this is easily done with ASP.

    Just
    > see what value was selected, and then get the appropriate data based on

    that
    > value (using a "Select Case", or multiple "if" statements).
    >
    > If you want this to happen as soon as the user changes the value of the
    > first select box, without sending the data to the server, then you are
    > asking a JavaScript question, which is off topic for this group. However,
    > to do that you would need to get all of the possible values when the page

    is
    > first loaded, and then store all of the values in JavaScript arrays, and
    > then use JavaScript to dynamically load the appropriate array into the
    > options for that select box.
    >
    > Regards,
    > Peter Foti
    >
    >
     
    Robin, Apr 9, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. OzThor

    using selct/option

    OzThor, Apr 18, 2004, in forum: HTML
    Replies:
    2
    Views:
    409
    mscir
    Apr 18, 2004
  2. J. Hall
    Replies:
    2
    Views:
    1,089
    Jeff Thies
    Apr 21, 2004
  3. palmiere
    Replies:
    1
    Views:
    431
    Erwin Moller
    Feb 9, 2004
  4. Ferd Berfel
    Replies:
    4
    Views:
    156
  5. WebRaster
    Replies:
    1
    Views:
    279
    Francisco Spaeth
    Oct 26, 2005
Loading...

Share This Page