2 comboboxes values of 2nd depends on 1st ,OPTION values from Database

Discussion in 'JSP' started by sriram225, Jun 12, 2009.

  1. sriram225

    sriram225 New Member

    Joined:
    May 22, 2009
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    hi all!
    i am new to jsp, i have two comboboxes,in which values of 2nd combo box are linked two first combo box and we get values for both these boxes from database.

    table1
    Code:
    (pk)itemno:text
    itemname:text (no duplicates)
    table2
    Code:
    (pk)itemno:text(duplicates)
    (pk)pcode:text
    pname:text(no duplicates)
    
    i want to display..

    combobox1:itemname
    combobox2:pname

    Note: Both Values of combobox are to be retrieved from database.

    when user select itemname corresponding values of pname should be displayed. I went through google and some threads of this forum and found some info but there option values are not retrieved from database(given in code itself), but i'm puzzled from retrieving 1st combo values and select one to retrieve the values of 2nd combo.

    Hope i have made my question clear. Thank You all!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice