Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Suggestions to present large amounts of data in a small amount of space...

Posted on 2003-03-11
Medium Priority
Last Modified: 2010-04-09
I have a large amount of data that needs to be presented in a Portlet.  Since a portlet grows dynamically based on the size of the content, I don't want all of the data showing at one time.  It would be nice if the user could scroll through the list of data while in a table-like format.

I know that you can create a scrolling table using JavaScript, but it only works with IE.  I need this to work for various browsers, but most importantly Netscape and IE.

There might be a different design approach to display this data.  Any suggestions would be most helpful.  Thanks!
Question by:JackNCalvin
  • 2

Accepted Solution

MusicMan earned 300 total points
ID: 8111581
Try this.

This DHTML script will put a small, fixed, scrollable window into your page. You can change the height, width, background color and content of the window.
To configure the script:
The width of the "window" is 170 and the height is 150. To alter the height and width of the window, change ALL values of 170 to another value, and the same for 150. You can also give the window a different background color by changing "white" to another color name or hex code. Also, change the text to whatever you want by replacing the text (you can use HTML as well) inside of the <DIV> tag.

<!-- Put this code into your page wherever you want the small window to be. -->

<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">

<layer name="scroll2" width=170 height=150 bgColor="white">

<div id="scroll3" style="width:170;height:150;background-color:yellow;overflow:scroll">

This is a nifty little script that allows you to put any content you want within a scrollable mini "window". This will allow you to save valuable screen space while making your page more "interactive".
This script uses two different techniques, one for Internet Explorer and one for Netscape, to create the scrollable window.
IE 4+ users will be able to use scrollbars to scroll the window, while Netscape users will have to use the "up" and "down" buttons instead (since Netscape does not support the adding of scrollbars to the "window" contents).



var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)

function clearup(){
if (window.temp2)

function cleardown(){
if (window.temp)


<br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()"
onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#"
onMousedown="down()" onMouseup="cleardown()" onClick="return false"
onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>


Author Comment

ID: 8111862
Wow... that is awesome!  I have seen the IE fix before but never the Netscape.  Great design suggestion.  Thanks a lot!


Author Comment

ID: 8111874
Couldn't have been a better solution.  Thanks!

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

571 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