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

The plus or minus images get out of sequence when the user uses the Back Button in his browser to return to a TreeMenu Magic page in IE5.x on the Mac. Is there a fix for this?

The Answer

Prepared Nov. 2003 by Gerry Jacobsen, PVII

IE5.x on the Mac has problematic behavior when using the Back button, not all of the menu elements are properly restored.

Here's the fix:

1. We'll need to add a little fix to prevent IE5.x on the Mac from re-running the P7_TMclass() function:

-Locate the P7_TMclass JavaScript function.

-Add this line of code as the first line in the script:

 if(!document.p7tmclass){document.p7tmclass=1;}else{return;}

so that it now looks like this:

function P7_TMclass(){ //v2.5 by Project Seven Development(PVII)
  if(!document.p7tmclass){document.p7tmclass=1;}else{return;}
  var i,x,d,tN,......................................

2. Next, we'll make a small change to the P7_TMenu function to prevent IE5.x from getting confused:

-Locate the P7_TMenu JavaScript function.

-Locate these two lines, the last two of the script:

 }else if(j=='-'){k='+'+k.substring(1,k.length);}c.data=k;}if(b.className=='p7plusmark'){
 b.className='p7minusmark';}else if(b.className=='p7minusmark'){b.className='p7plusmark';}}

-Place two slashes (//) in front of each of these lines in order to disable them, like:

 //}else if(j=='-'){k='+'+k.substring(1,k.length);}c.data=k;}if(b.className=='p7plusmark'){
 //b.className='p7minusmark';}else if(b.className=='p7minusmark'){b.className='p7plusmark';}}

-Now, Copy and Paste these three new code lines right after the two disabled lines:

}else if(j=='-'){k='+'+k.substring(1,k.length);}c.data=k;}if(b.className=='p7plusmark'){
  if(hh=='block'){b.className='p7minusmark';}}else if(b.className=='p7minusmark'){
  if(hh=='none'){b.className='p7plusmark';}}}

The result will look like this:

.........
  //}else if(j=='-'){k='+'+k.substring(1,k.length);}c.data=k;}if(b.className=='p7plusmark'){
  //b.className='p7minusmark';}else if(b.className=='p7minusmark'){b.className='p7plusmark';}}
  }else if(j=='-'){k='+'+k.substring(1,k.length);}c.data=k;}if(b.className=='p7plusmark'){
  if(hh=='block'){b.className='p7minusmark';}}else if(b.className=='p7minusmark'){
  if(hh=='none'){b.className='p7plusmark';}}}
  }

-Save the file.

That's it! IE5.2 will now render the trigger states correctly when the page is viewed by using the Back button.

 

Back to the questions list