I am a novice Java programmer, I'm working with Jsp + Javascript to develop a web application.I only have basic Html knowledge and I mostly use "FrontPage" to develop my web pages but currently my webpage requires some dHtml and CSS fundamentals hence I'm posting a query in this forum expecting some guidance,
I have a floating table in my webpage which I achieved using JS. I have written Jsp code to get database records one by one and append it to this table(i.e basically the table is being created on the fly), its all good till here but now I need to make this table scrollable and thats where I'm stuck! I have attached a snapshot of my webpage here and my code(Jsp) is as below:-
Expand|Select|Wrap|Line Numbers
- <%
- out.write("<html>\r\n");
- out.write("<head>\r\n");
- out.write("<style type=text/css>table.T1 {overflow: scroll}</style>");
- out.write("<layer id = divStayTopLeft>");
- out.write("<div align = right>");
- out.write("<table class = T1 align = right border = 1 width=450 cellspacing = 0 cellpadding = 0 >");
- out.write("<tr><td bgcolor=#FFFFCC><b>Candidate Name</b></td>");
- out.write("<td bgcolor=#FFFFCC><b>Batch-ID</b></td>");
- out.write("<td bgcolor=#FFFFCC><b>Reg Amt</b></td>");
- out.write("<td bgcolor=#FFFFCC><b>Total Fees </b></td>");
- out.write("<td bgcolor=#FFFFCC><b>Balance</b></td></tr>");
- // Here I have the code for getting the backend-table's record and appending it to the Html table as a new row.
- out.write("</table>");
- out.write("</div>");
- out.write("</layer>");
- out.write("</head>");
- out.write("</html>");
- %>