Solved

Lock Header and First Column in HTML table (JSP)

Posted on 2004-10-04
2
737 Views
Last Modified: 2012-06-22
Hi Experts,
I am trying to implement table which has its header and first column frozen so the user can scroll vertically and horizontally.  I've made my table horizontally scrollable, but how about vertical scrolling. Also, is it possible to show (horizontal) scroll bars at the top and the bottom of the table..
Thanks for your help!!
Below is my sample JSP



<%@ include file="/system/wbheader.jsp"%>
<%@ taglib uri="/WEB-INF/wbsys.tld" prefix="wb"%>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>



<wb:page login='false' domain="VR" fillCurrentLocaleDomainWithDefaults="false" submitMethod='post' submitAction=''>



      <div style="position:absolute;top:60;left:0;width:100">
      <table width="100" frame="border">
      <tr style="height:60"><td>Employee</td></tr>
      <%
            for(int headerEmployee=0;headerEmployee<5;headerEmployee++)
            {
      %>
      <tr style="height:0"><td>John</td></tr>
     
      <%
        }
      %>
       </table></div>             
      
      
      <div STYLE="position:absolute;left:100;top:60;overflow-x:scroll;width:250px">
         <table frame="border">
         
        <tr style="height:60">
        <%
         for (int headerTimeCode=0;headerTimeCode<10;headerTimeCode++)
         {
        %>
         <td>Day</td>
        <%  
         }
            %>  
            </tr>  


      
            <%
             for (int rowData=0;rowData<5;rowData++)
         {            
                  
            %>
            <tr style="height:0">
            <%
               for (int tCodeData=0;tCodeData<10;tCodeData++)
               {            
              
                  %>      
                    <td>HW</td>
                  <%
                  }
            }
            %>  
            <tr>
             </table>
             </div>
             
 
</wb:page>
0
Comment
Question by:germess
  • 2
2 Comments
 
LVL 4

Accepted Solution

by:
aratani earned 250 total points
ID: 12222578
To make it scrollable vertically, I would assume you owuld have to do the following,

overflow-y:scroll;

Add that to the div style value.

AJ
0
 
LVL 4

Expert Comment

by:aratani
ID: 12242885
Hey gerness, you should type your response in here,

AJ
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now