Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #88

Is it possible to automatically hide the GeeWizz scroller controls if the scroller does not contain enough content to require scrolling?

The Answer

Prepared Aug. 2002 by Gerry Jacobsen, PVII

In cases where the content is created dynamically, or you are using multiple content layers, there may be times when the rendered content of the scrolling layer is not enough to require scrolling. You can add a special javascript function, P7_setGWcontrols, to your page that will handle this automatically. This example page that demonstrates the automatic display of the control buttons:

GeeWizz auto-hide scroller controls example page

Here are the modification steps:

1. Copy and paste the P7_setGWcontrols function to your page, right after the "P7_runScroller" function in the <script> section of the page.

function P7_setGWcontrols(co){ //v1.0 GW add-on by PVII
  var g,d,dd,h,hh,mt="visible";
  var theCont = new Array();
  //declare the list of control divs to be hidden
  theCont[0] = 'p7sc1Up';
  theCont[1] = 'p7sc1UpBG';
  theCont[2] = 'p7sc1Down';
  theCont[3] = 'p7sc1DownBG';
  theCont[4] = 'p7sc1Reset';
  theCont[5] = 'p7sc1ResetBG';
  if(document.all || document.getElementById){
  }else if(document.layers){h=parseInt(d.clip.height);w=parseInt(d.clip.width);}

2. Modify the existing "P7_setScroller" function to automatically run the new "P7_setGWcontrols" function.

-Locate the last line of the P7_setScroller function:


-Place your cursor at the end of this line and click the Enter key to create a new line.

-On this new line, enter (copy and paste) this bit of code:


-The revised function should look like this:


That's it! Now the scroller will automatically check the rendered height of the current content layer and show or hide the scroller controls as needed.

Back to the questions list