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

    Join Date
    Apr 2002
    Posts
    2
    Rep Power
    0

    Unhappy Inserting data into a table


    Is it possible to write jsp code in the middle of the html to insert data from table in database into table on browser. I want to write it in the html as the data in the table are going to be active links to the next page.

    Something like:
    HTML

    <% For n=1 to rs.count%>
    <%rs.field("1")%>
    <href <% rs.next%>/href>


    If anyone can help me with the proper jsp code i'd really appreciate it, I need help urgently....
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Posts
    45
    Rep Power
    14
    try something like this

    <table>
    while (rs.next())
    {
    out.println("<tr><td><a href=" + <%rs.field("1")%> + ">" + <%rs.field("1")%> + </a></td></tr>");
    }
    </table>


    I'm not 100% sure on the syntax. I usually use servlets but they are very similar.

IMN logo majestic logo threadwatch logo seochat tools logo