You have a different number of elements (9) with the class of 'showstate' than ones (7) with the class of 'switchcontent'. As this function:
Code:
function revivestatus(){
var inc=0
while (statecollect[inc]){
if (ccollect[inc].style.display=="none")
statecollect[inc].src=expandsymbol
else
statecollect[inc].src=contractsymbol
inc++
}
}
does its work, it runs out of ccollects (the switchcontent class) before it is done with the statecollects (the showstate class)
For persistence to work, you need to first turn it on (in the configuration area of script, near the top):
Code:
var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
And, you need to replace this:
HTML Code:
<!-- News -->
<table class="indexTableContent" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="headers"><img src="../newSite/images/minus.png" alt="Expand/Collapse" class="showstate" onclick="expandcontent(this, 'news')" />News</td>
</tr>
<tr>
<td id="news" class="switchcontent" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="margin-bottom:5px"> <tr> <td class="newsHeader"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>News Feature</td><td align="right">06/06/06</td><td width="20px"><img src="../newSite/images/minus.png" alt="Expand/Collapse" class="showstate" onclick="expandcontent(this, 'number3')" /></td></tr></table></td> </tr> <tr> <td id="number3" class="newsContent">This is where the news will now be displayed. Updated by Gillian or Joanne.</td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="2" style="margin-bottom:5px"> <tr> <td class="newsHeader"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>New Site</td><td align="right">04/05/06</td><td width="20px"><img src="../newSite/images/minus.png" alt="Expand/Collapse" class="showstate" onclick="expandcontent(this, 'number1')" /></td></tr></table></td> </tr> <tr> <td id="number1" class="newsContent">Welcome to the new JC PomPoms site. Have a look around n tell us what you think.</td> </tr> </table> </td>
</tr>
</table>
<!-- News -->
with:
HTML Code:
<!-- News -->
<table class="indexTableContent" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="headers"><img src="../newSite/images/minus.png" alt="Expand/Collapse" class="showstate" onclick="expandcontent(this, 'news')" />News</td>
</tr>
<tr>
<td id="news" class="switchcontent" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="2" style="margin-bottom:5px"> <tr> <td class="headers"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>News Feature</td><td align="right">06/06/06</td><td width="20px"><img src="../newSite/images/minus.png" alt="Expand/Collapse" class="showstate" onclick="expandcontent(this, 'number3')" /></td></tr></table></td> </tr> <tr> <td id="number3" class="switchcontent">This is where the news will now be displayed. Updated by Gillian or Joanne.</td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="2" style="margin-bottom:5px"> <tr> <td class="headers"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>New Site</td><td align="right">04/05/06</td><td width="20px"><img src="../newSite/images/minus.png" alt="Expand/Collapse" class="showstate" onclick="expandcontent(this, 'number1')" /></td></tr></table></td> </tr> <tr> <td id="number1" class="switchcontent">Welcome to the new JC PomPoms site. Have a look around n tell us what you think.</td> </tr> </table> </td>
</tr>
</table>
<!-- News -->
Bookmarks