Forum Moderators: open
With me? Well, the programmer says this is maybe doable but at great expense and probably horrible design. He says one dimension is much easier and much cheaper (Grrrrr!).
Has anyone seen this done? If so, where please. Has anyone done this? If so, how?
Thanks,
Shane
Now, you can load the data in a table - the columns expand to whatever width they want to. If you have the titles in a series of DIVs you can set the width of the DIV absolutely (from reading the widths of the data table cells) and unlike a table cell it will not exceed that width.
So, suggest the titles in a DIV surrounding each column heading in it's own DIV. There's work to be done in the synchronisation of the scrollabe data section with the titles but this is fairly simple.
Thanks for the feedback so far. You peoples are great! (Any more thoughts appreciated:))
..... Shane
nav iga tion bar________________________
scrollable main container div ¦
scrollable main container div ¦
scrollable main container div ¦
scrollable main container div ¦
scrollable main container div ¦
__________________________________________
After seeing this post, I realize that the top and bottom solid lines don't match up and neither do the pipes at the end of the div, but they do when in the iframe, trust me! :)
The iframe has a set width in its container page and is set not to scroll. The scrollable main container div has no width restrictions...until it appears in the iframe, at which time, the div is restricted by the size of the iframe. Put your table in the scrollable div and you should have no problems.
Of course, this alone only solves your vertical movement. You could use some javascript to "move" the column headings along with your table data. In that case I'd put the column headings in another iframe and synchronize its movement to the movement of the data iframe.
If you want to see it in action, and how it applies to your problem, gimme a sticky.
Okay, that doesn't sound good, but you know what I mean.
<HTML>
<HEAD>
<style>
TD {width:100}
</style>
<script>
function sync()
{
var lft = document.all("dvData").scrollLeft
document.all("dvHeader").style.width=200+lft
document.all("dvHeader").style.left= -lft
}
</script>
</HEAD>
<BODY>
<div id="dvHeader" style="position:absolute; left:0; top:0; height:50; width:200; overflow:hidden">
<table border=1 bgcolor=cyan width=1000 id="tblHeader">
<tr><td>title 1</td><td>title 2</td><td>title 3</td><td>title 4</td><td>title 5</td><td>title 6</td><td>title 7</td></tr>
</table></div>
<div id="dvData" style="position:absolute; left:0; top:30;height:80; width:200;overflow:auto" onscroll="sync()">
<table border=1 width=1000 name="tblData" id="tblData">
<tr><td>1000</td><td>1000</td><td>1000</td><td>1000</td><td>1000</td><td>1000</td><td>1000</td></tr>
<tr><td>1000</td><td>1000</td><td>1000</td><td>1000</td><td>1000</td><td>1000</td><td>1000</td></tr></table>
</div>
</BODY>
</HTML>
Scrolling parts and havign aligned parts fixed is easy, that's what frames are made for. But waht you want is to have something which is sometiems fixed (for vertical scrolling ) and moves at other times (horizontal scrolling) and vice versa for the vertical column titles.
It's doable in Js and DHTML which is in fact very capable. But your programmer was quite right in saying it may be rather complex to get working reliably and therefore cost $$$.
It really depends on the circumstances. if it'S for an intranet or admin system, it could be designed for just one browser and be much easier to do.
Also, it greatly depends on the experiecne of your programmer. I for example, have a long tiem ago created an extensive object library for movable JS/DHTML stuff, and with a toolset like that it would be much quicker to do.
But it certainly is not a trivial problem.
SN