Microsoft Corporation
Updated June 10, 1999
Insert the following JavaScript functions between the <HEAD>
start and end tags of the page:
<SCRIPT LANGUAGE="JavaScript">
<!--
function function1Name(idVariable){
//display the section if it's not displayed; hide it if it is displayed
if (idVariable.style.display=="none"){idVariable.style.display=""}
else{idVariable.style.display="none"}
}
function function2Name(idVariable){
//remove the section when user clicks in the opened DIV
if (idVariable.style.display==""){idVariable.style.display="none"}
}
-->
Where function1Name
and function2Name
are the names of each function, and idVariable
is the variable for the unique ID that is passed to the script each time a user clicks the link.
The following is the actual JavaScript code used in the HTML Help documentation:
function doSection (secNum){
//display the section if it's not displayed; hide it if it is displayed
if (secNum.style.display=="none"){secNum.style.display=""}
else{secNum.style.display="none"}
}
function noSection (secNum){
//remove the section when user clicks in the opened DIV
if (secNum.style.display==""){secNum.style.display="none"}
}
Update your style sheet | |