Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having a table in a layer

Status
Not open for further replies.

countdrak

Programmer
Jun 20, 2003
358
US
Ok on my coldfusion page I generate a long list using tables. I loop through a query and display everything on a page. The problem is the user has to scroll down a really big page to see all the entries.

So i decided to put a layer on the page to display the list in a box with scroll bars on the side. But here is the problem the layer only works if i dont have columns in it.

Here is my code---

Code:
  <ilayer name="scroll1" width=100% height="200" clip="0,0,100%,200">
    	  <layer name="scroll2" width=100% height=200 bgColor="white">
		  <div id="scroll3" style="width:100%;height:200px;background-color:white;overflow:scroll">
		  <cfloop query="MyQuery">
		  <input name="checkbox1" type="checkbox" value="#ID#">&nbsp;&nbsp;&nbsp;#Description#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Date#
		  <br>
		  </cfloop>
		  </div>
		  </layer>
		  </ilayer>

So instead of having the spaces I want the data to be in colums with column headers in a layer. Can someone help please, I have tried a number of combinations, but it just doesnt work! Thanks
 
<ilayer> and <layer> are not valid html tags, so you might actually get rid of them. Your scrollable layer is the div with overflow: scroll;. As long as that div has a fixed width/height (like yours does) it will remain its form and everything within that div will be scrolled. So just put your entire table inside that div. If you want to have table head always visible, that makes it a lot more difficult to make -- one table with the head above the div and one table with fields in the div, make sure you shift the whole thing so that the columns are adjusted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top