Connected Dropdown for database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • collamack
    New Member
    • Dec 2006
    • 1

    #1

    Connected Dropdown for database

    hai guys, i'm undergoing practical in a system company. unfortunately i'm stuck to write code for connected dropdowns...4 dropdowns..

    when the user choose the 1st dropdown, the options of 1st dropdown would be listed in the 2nd dropdown and so on for the 3rd and 4th. i was trying to search in google but all codes are for specific data@array.

    what i'm doing right now,the options are from database and make me dying is there are different tables and they are related by some foreign key.

    please help me.
    1st dropdown: table 'product_catego ry'
    2nd & 3rd dropdown: table 'product'
    foreign key [product_categor y & product] = product_id

    4th dropdown: table 'supplier'
    foreign key [product & supplier] = supplier_id


    Thank you!
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Originally posted by collamack
    hai guys, i'm undergoing practical in a system company. unfortunately i'm stuck to write code for connected dropdowns...4 dropdowns..

    when the user choose the 1st dropdown, the options of 1st dropdown would be listed in the 2nd dropdown and so on for the 3rd and 4th. i was trying to search in google but all codes are for specific data@array.

    what i'm doing right now,the options are from database and make me dying is there are different tables and they are related by some foreign key.

    please help me.
    1st dropdown: table 'product_catego ry'
    2nd & 3rd dropdown: table 'product'
    foreign key [product_categor y & product] = product_id

    4th dropdown: table 'supplier'
    foreign key [product & supplier] = supplier_id


    Thank you!
    You are in luck (I think).
    I just worked out a similar problem with one of our members for 6 connected drop-downs. Using the MySQL database as the selection method.
    Also, it uses Ajax to go to the server and generate the next dropdown each time in the client. You can have that code, if you want it.
    Because the code involved is a bit more then would be sensible to post here (I hope we will have a 'snippet' forum some day, so I can post it there), I suggest I'd send it to you via PM.

    Ronald :cool:

    Comment

    • mainul
      New Member
      • Sep 2006
      • 51

      #3
      check out the link below

      http://www.plus2net.co m/javascript_tuto rial/dropdown-list.php

      best regards
      Mainul

      Comment

      • subash
        New Member
        • Sep 2006
        • 32

        #4
        Hi Ronald,

        I have used 3 inter-related combo box selection, This is amazing for me to use 6 combo boxes, Could you please send me the code.

        Subash

        Originally posted by ronverdonk
        You are in luck (I think).
        I just worked out a similar problem with one of our members for 6 connected drop-downs. Using the MySQL database as the selection method.
        Also, it uses Ajax to go to the server and generate the next dropdown each time in the client. You can have that code, if you want it.
        Because the code involved is a bit more then would be sensible to post here (I hope we will have a 'snippet' forum some day, so I can post it there), I suggest I'd send it to you via PM.

        Ronald :cool:

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          subash: I will, see the email message I sent. As I said earlier, it is no use to just drop it into this forum because (a) it is a lot of code, and (b) it could start a complete new forum.

          Ronald :cool:

          Comment

          • subash
            New Member
            • Sep 2006
            • 32

            #6
            cool Ronald, Thanks for your immediate reply

            Subash

            Originally posted by ronverdonk
            subash: I will, see the email message I sent. As I said earlier, it is no use to just drop it into this forum because (a) it is a lot of code, and (b) it could start a complete new forum.

            Ronald :cool:

            Comment

            Working...