Solved

Lock Header and First Column in HTML table (JSP)

Posted on 2004-10-04
2
739 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This video teaches users how to migrate an existing Wordpress website to a new domain.

752 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