User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 425,979 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,613 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 243 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 4
Reputation: macy2323 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
macy2323 macy2323 is offline Offline
Newbie Poster

headers and expandable columns in php

  #1  
Apr 24th, 2008
Can somebody please help me? i'm having a big problem on tables. Our client want to have a table where its columns are expandable and the headers of the table can be viewed no matter how many rows there are(you can always see the header even if you scroll down the table). It is exactly how an excel table behaves.
I am really having a hard time researching about this. Thank you!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2005
Posts: 689
Reputation: digital-ether has a spectacular aura about digital-ether has a spectacular aura about 
Rep Power: 6
Solved Threads: 41
Moderator
digital-ether's Avatar
digital-ether digital-ether is offline Offline
Practically a Master Poster

Re: headers and expandable columns in php

  #2  
Apr 24th, 2008
Originally Posted by macy2323 View Post
Can somebody please help me? i'm having a big problem on tables. Our client want to have a table where its columns are expandable and the headers of the table can be viewed no matter how many rows there are(you can always see the header even if you scroll down the table). It is exactly how an excel table behaves.
I am really having a hard time researching about this. Thank you!


This is probably better suited for the JavaScript forum. They would be more able to help you there.

What you would want is to have the table header (or div with a copy of the table headers) detach from the top of the table when the window scrolls lower then the header, That way the header will always appear at the top of the table.

This can be done with JavaScript, and some CSS.

You'll need to know when the window scrolls. (window.onScroll event)
The amount of scroll. (window.scrollTop)
The dimensions of the window. (browser dependent, good reference at quirksmode.com and http://www.howtocreate.co.uk/tutoria.../browserwindow)
The offset from the top, of the table. (offsetTop http://www.quirksmode.org/js/findpos.html)
How to float an HTML element as well as move it. (CSS position:absolute and top, left properties)

I'd recommend the mooTools library. It has methods that will account for different browsers and calculate what you want for you. However you could probably put it together with a bit of googling.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 11:25 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC