RE: [Zope] Scrolling Tables
Jens Vagelpohl wrote:
To me that sounds like a pure HTML issue that has nothing to do with Zope.
It is an HTML issue but HTML doesn't have an easy way to do it. I hoped that there might be some sort of plug in that someone here had worked with. Something that could work with Zope. Dylan Reinhardt wrote:
You could hack this together using DHTML/JavaScript with frames.
Use JavaScript to measure the columns as rendered and squeeze a matching header into a frame just above the table. Won't be trivial, but it should definitely be possible.
This is probably the best suggestion but it's beyond my current abilities. I didn't know that JavaScript could read the column headings. Does Jython allow you to do this kind of scripting using Python instead of Java? I'd rather not go back to a second language. Jim Washington wrote:
Not a zope question, but there is overflow:auto in css, which solved some similar problems for me.
Thanks. That does help with some of the other things I've been working on but it doesn't help here. The problem is that the entire table still scrolls causing my column headings to scroll off the top. The only way that I can see to keep this from happening is to split the headings into a separate table but since the column widths are determined by the data in the table, the column headings won't match up. I'll explore Dylan's suggestion but the complexity means I'll have to save it for later. It feels like I'm reinventing the wheel here. This seems like it should be a common problem that something in HTML should be able to deal with automatically. Oh well. I guess you need to deal with what is not what should be. Thanks everyone for your help. Joe Goldthwaite Property of Bar-S Foods. This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, dissemination of this communication is prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately at 602.264.7272 or postmaster@bar-s.com.
On Wed, 2004-01-07 at 10:28, Goldthwaite, Joe wrote:
Dylan Reinhardt wrote:
You could hack this together using DHTML/JavaScript with frames.
Use JavaScript to measure the columns as rendered and squeeze a matching header into a frame just above the table. Won't be trivial, but it should definitely be possible.
This is probably the best suggestion but it's beyond my current abilities. I didn't know that JavaScript could read the column headings. Does Jython allow you to do this kind of scripting using Python instead of Java? I'd rather not go back to a second language.
JavaScript is a client-side browser scripting language that is not related to Java. Programming in JavaScript is a bit like jogging in deep snow -- you can usually get where you're going, but it sucks. Unfortunately, there aren't any good alternatives when it comes to client-side scripting. And this will need to be client-side if you're going to account for client-side settings such as screen size. JavaScript can dynamically obtain (and change) the sizes, position, and other properties of just about any element that supports an id attribute. Measuring, sizing and drawing elements generally works well, but is inevitably a bigger hassle than it seems like it should be.
I'll explore Dylan's suggestion but the complexity means I'll have to save it for later. It feels like I'm reinventing the wheel here. This seems like it should be a common problem that something in HTML should be able to deal with automatically.
It's solved in CSS, IIRC... but until CSS is fully implemented by major browsers, you're stuck re-inventing this particular wheel.
Oh well. I guess you need to deal with what is not what should be.
An excellent motto for a web-app programmer. :-) Dylan
So you have content you wish to scroll. It is in a table. The problem you are having is that when you set up the scroller it scrolls the whole table. Sorry if some one has pointed this out already, but why can't you just create your base table with you heading etc and in the field you want to scroll content create another table (border="0" :) ) and scroll that??? Eg. <table> <tr> <td> <span>heading</span> </td> </tr> <tr> <td> <table> //Add all scrolling code to this table <tr> <td> Your scrolling content goes hear </td> </tr> </table> </td> </tr> </table> Anyway hope I have been some help :-) -tim zegir
-----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of Dylan Reinhardt Sent: Thursday, 8 January 2004 6:00 AM To: Goldthwaite, Joe Cc: Zope Users Subject: RE: [Zope] Scrolling Tables
On Wed, 2004-01-07 at 10:28, Goldthwaite, Joe wrote:
Dylan Reinhardt wrote:
You could hack this together using DHTML/JavaScript with frames.
Use JavaScript to measure the columns as rendered and squeeze a matching header into a frame just above the table. Won't be trivial, but it should definitely be possible.
This is probably the best suggestion but it's beyond my current abilities. I didn't know that JavaScript could read the column headings. Does Jython allow you to do this kind of scripting using Python instead of Java? I'd rather not go back to a second language.
JavaScript is a client-side browser scripting language that is not related to Java. Programming in JavaScript is a bit like jogging in deep snow -- you can usually get where you're going, but it sucks.
Unfortunately, there aren't any good alternatives when it comes to client-side scripting. And this will need to be client-side if you're going to account for client-side settings such as screen size.
JavaScript can dynamically obtain (and change) the sizes, position, and other properties of just about any element that supports an id attribute. Measuring, sizing and drawing elements generally works well, but is inevitably a bigger hassle than it seems like it should be.
I'll explore Dylan's suggestion but the complexity means I'll have to save it for later. It feels like I'm reinventing the wheel here. This seems like it should be a common problem that something in HTML should be able to deal with automatically.
It's solved in CSS, IIRC... but until CSS is fully implemented by major browsers, you're stuck re-inventing this particular wheel.
Oh well. I guess you need to deal with what is not what should be.
An excellent motto for a web-app programmer. :-)
Dylan
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Dylan Reinhardt -
Goldthwaite, Joe -
Tim Zegir