#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    19
    Rep Power
    0

    Display further details of retreived data in a text field


    I have a drop down menu (list) and a textfield. The drop down menu displays all the schools in the database and the textfield will display the schoolcode. Currently, i am able to display all the schools, however, i need to know how to change the schoolcode (in a textfield) when i change the school (drop down menu). As in it changes automatically when i select the particular school.

    eg: school abc with school code 123. when i select the school, it should as well change the school code in the textfield.. Pls help....

    The codes i have now is:

    <%
    while(rs.next()){
    site = rs.getString(1);
    %>
    <option value="School" selected> <%= site%> </option>
    <%}
    rs.close();
    statement.close();
    //connection.close();
    %>


    <%
    while(rs2.next()){
    String siteCode = rs2.getString(1);
    %>
    <td width="60%">School Code:
    <input type="text" name="sn" value="<%= siteCode%>">
    </td>
    <%}
    rs2.close();
    statement2.close();
    //connection.close();
    %>


    *Note: i am currently using 2 queries..
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    19
    Rep Power
    0
    problem solved.
    thanks....

IMN logo majestic logo threadwatch logo seochat tools logo