show hide divs - show last state upon reload/post
- From: ll <barn104_1999@xxxxxxxxx>
- Date: Wed, 30 Apr 2008 12:05:49 -0700 (PDT)
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="javascript" 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.getElementById){
if(document.getElementById(id).style.display == 'none'){
document.getElementById(id).style.display = 'block';
} else {
document.getElementById(id).style.display = 'none';
}
return false;
}
}
</script>
.
- Prev by Date: Re: Change id of element in DOM, IE7...
- Previous by thread: Frame pages force refresh
- Index(es):
Relevant Pages
|