[Javascript] js error

Paul McGuire pmcguire at cguk.co.uk
Thu Mar 18 07:15:46 CST 2004


I use this script in my pages the asp parts just place in the relevent form
name. they can be ignored as its not part of my error.

When I run this the script is happy to hide the layer but then will not
reshow it due to this error coming up.

could not get the visibility property - insvalid argument

what could be wrong? Its almost as if once the layer <div id=rangelayer> is
hidden the script cant find it to show it again!

<script>
  var hiddenField = "yes"
  var showlayer = document.getElementById("rangelayer").style
  showlayer.visibility = "hidden";

  function hideshow(){
  if(hiddenField == "yes"){
  showlayer.visibility = "visiable";
  hiddenField = "no"
  }
  else{if(hiddenField == "no")
  {
  showlayer.visibility = "hidden";
  hiddenField = "yes"
  }
  }
  }
 </script>




More information about the Javascript mailing list