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

x
?
Solved

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

Posted on 2003-03-11
3
Medium Priority
?
146 Views
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!
0
Comment
Question by:JackNCalvin
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
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".
<br><br>
This script uses two different techniques, one for Internet Explorer and one for Netscape, to create the scrollable window.
<br><br>
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).

</div>
</layer>
</ilayer>

<script>

var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
scrolldoc.top+=10
temp2=setTimeout("up()",50)
}
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)
scrolldoc.top-=10
temp=setTimeout("down()",50)
}

function clearup(){
if (window.temp2)
clearInterval(temp2)
}

function cleardown(){
if (window.temp)
clearInterval(temp)
}

</script>

<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>


0
 

Author Comment

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

-J-
0
 

Author Comment

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

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