how to implement a dynamic combo box selection system

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ranga044
    New Member
    • Jan 2008
    • 3

    how to implement a dynamic combo box selection system

    Hi Guys,

    I'm implementing a system these days, i want to implement a combo box selection process but i don't know how to implement it, so asking you guys favor?

    my scenario is this, let's say we have two combo box selection lists, left one and right one, left one is the main one and the right one is the child of the left one.

    when i select a item from the left combo box the right combo box's content should be changed according to the selection of the left one,

    Ex: let's think about mobile phones, if i select the brand Nokia from the left combo box right combo box's content should be changed to
    C6-01
    E7-00
    5232
    X3-02
    C1-01
    C7-00
    5228
    C5-03
    5250
    6120ci
    E5-00
    E73 like wise. please help me to implement a this kind of scenario!

    regards,
    Rangana
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    There's a number of ways you could do this. If you want to have an almost instant change, you could use Ajax (make a request to a script which returns the corresponding options, parse the response and then add the options).

    Some more alternatives:
    1. Use a submit button - no JavaScript involved.
    2. Submit the form onchange - minimal JavaScript
    3. Store the options in a JavaScript array on page load and use these to create the new options whenever the first one changes.

    Comment

    • ranga044
      New Member
      • Jan 2008
      • 3

      #3
      any tutorials where i can study this up? i'm new to development , it's very hard for me to get the concepts.... :(

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Would that be a tutorial on JavaScript, or for this particular task? What exactly are you struggling with? If it's JavaScript, check out the Off-site Links thread.

        Check out this thread (there are many more if you search).

        Comment

        Working...