My menu options provides hide/show checkbox areas on a form. During an IE postback or "back" the array is lost and the checkboxes disappear from view. Now I need a way to keep the array between pages so the added checkboxes on the form do not disappear.
Thanks for your suggestions.
[code=javascript]
menu_status = new Array();
function showHide(theid) {
if (document.getEl ementById) {
var switch_id = document.getEle mentById(theid) ;
if(menu_status[theid] != 'show') {
switch_id.class Name = 'show';
menu_status[theid] = 'show';
}else{
switch_id.class Name = 'hide';
menu_status[theid] = 'hide';
}
}
}[/code]
[code=html]
<a class="a" href='#'>MainMe nu<br>
<table>
<tr><td><a href="#" onclick="showHi de('mymenu1')"> jump1</a></td></tr>
<tr><td><a href="#" onclick="showHi de('mymenu2')"> jump2</a></td></tr>
<tr><td><a href="#" onclick="showHi de('mymenu3')"> jump3</a></td></tr>
</table>
<div id="mymenu1" class=hide>
<input type="checkbox" name="Topic" value="_select1 " /> jump1selection
</div>
<div id="mymenu2" class=hide>
<input type="checkbox" name="Topic" value="_select2 " /> jump2selection
</div>
<div id="mymenu3" class=hide>
<input type="checkbox" name="Topic" value="_select3 " /> jump3selection
</div>
[/code]
Thanks for your suggestions.
[code=javascript]
menu_status = new Array();
function showHide(theid) {
if (document.getEl ementById) {
var switch_id = document.getEle mentById(theid) ;
if(menu_status[theid] != 'show') {
switch_id.class Name = 'show';
menu_status[theid] = 'show';
}else{
switch_id.class Name = 'hide';
menu_status[theid] = 'hide';
}
}
}[/code]
[code=html]
<a class="a" href='#'>MainMe nu<br>
<table>
<tr><td><a href="#" onclick="showHi de('mymenu1')"> jump1</a></td></tr>
<tr><td><a href="#" onclick="showHi de('mymenu2')"> jump2</a></td></tr>
<tr><td><a href="#" onclick="showHi de('mymenu3')"> jump3</a></td></tr>
</table>
<div id="mymenu1" class=hide>
<input type="checkbox" name="Topic" value="_select1 " /> jump1selection
</div>
<div id="mymenu2" class=hide>
<input type="checkbox" name="Topic" value="_select2 " /> jump2selection
</div>
<div id="mymenu3" class=hide>
<input type="checkbox" name="Topic" value="_select3 " /> jump3selection
</div>
[/code]
Comment