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

Is it possible to activate a specific GeeWizz content layer by passing an url parameter to the page?

The Answer

Prepared Oct. 2003 by Gerry Jacobsen, PVII

Here's a code tweak that will allow you to set the appropriate GeeWizz scrolling content layer by passing an url parameter.

1. Add this new function to your page (in the <script> tag), right underneath the other GeeWizz JavaScript functions (this function must by on the page that you are loading with the link):

function P7_setGWurl(){ //v1.0 by PVII
  var ur,x,i,nv,mn,pr=new Array();

2. To activate this function, add the function call to the end of your <body> onLoad event of the page that will be loaded, right after the P7_setScroller function like:

<body onLoad="P7_setScroller('p7scroller1','p7s1content1',0,0);P7_setGWurl()">

3. The function works by looking at all of the url parameters that were passed to the page (after the ? in the url). If it finds a match to the parameter name that is passed it will use that parameter value to trigger the menu. For example if the url looks like this:

the script will look for the "gw" parameter and use the value it sees, in this case "p7s1content2", to select the second scrolling content layer.

Alternatively, this example will open the page with the fourth content layer active:

This approach will still allow for the normal setScroller function to work, that is, if the page is called without the "gw" url parameter then the page will load as normal:

That's it!

Back to the questions list