I'm currently working on a form which consists of a show and hide
javascript. The toggle works fine, although when I click on submit, I
would like the page to reload with the toggle (show/hide) div in the
same state it was before being submitted. E.G. If the div was
visible, I'd like for it to be visible upon return.
Here's the script I'm currently using - thanks for any help,
Louis
--------------------------------------------
<script language="javas cript" type="text/javascript">
function WM_toggle(id){
if (document.all){
if(document.all[id].style.display == 'none'){
document.all[id].style.display = '';
} else {
document.all[id].style.display = 'none';
}
return false;
} else if (document.getEl ementById){
if(document.get ElementById(id) .style.display == 'none'){
document.getEle mentById(id).st yle.display = 'block';
} else {
document.getEle mentById(id).st yle.display = 'none';
}
return false;
}
}
</script>
javascript. The toggle works fine, although when I click on submit, I
would like the page to reload with the toggle (show/hide) div in the
same state it was before being submitted. E.G. If the div was
visible, I'd like for it to be visible upon return.
Here's the script I'm currently using - thanks for any help,
Louis
--------------------------------------------
<script language="javas cript" type="text/javascript">
function WM_toggle(id){
if (document.all){
if(document.all[id].style.display == 'none'){
document.all[id].style.display = '';
} else {
document.all[id].style.display = 'none';
}
return false;
} else if (document.getEl ementById){
if(document.get ElementById(id) .style.display == 'none'){
document.getEle mentById(id).st yle.display = 'block';
} else {
document.getEle mentById(id).st yle.display = 'none';
}
return false;
}
}
</script>
Comment