Thinking a bit more about it, yes GET would be easier.
Just append the current status (dispStatus) in a query string to the url that your < and > point to and then use code along the lines of -
Code:
<script type="text/javascript">
var dispStatus = <?php echo $_GET['txtDispStatus']; ?>;
function toggle() {
dispStatus = (dispStatus == 'block')? 'none' : 'block';
elem.style.display = dispStatus;
}
window.onload=function() {
elem = document.getElementById("toggleText");
elem.style.display = dispStatus;
}
</script>
Bookmarks