Need Help Please

Results 1 to 2 of 2

Thread: Need Help Please

  1. #1
    Join Date
    Dec 1969

    Default Need Help Please

    I am trying to work with layers in IE5 using Javascript. The problem: I want to display a layer using this code. It works fine in NS but not in IE5. I get an error <BR><BR>error: document.all[...].style is null or not an object <BR><BR>function showlayer(lay) { <BR>if (ie) {document.all[lay].style.visibility = "visible";} <BR>if (ns) {document.layers[lay].visibility = "show";} <BR>if (ns6) {document.getElementById([lay]).style.display = "block";} <BR>} <BR><BR>can someone help? <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Need Help Please

    the code is fine in itself. is the &#039;lay&#039; variable unique to the layer? that may cause it, or else it&#039;s possible that you&#039;re using a linked stylesheet, sometimes IE doesn&#039;t initialise style objects unless they&#039;re defined *in the page* somewhere. it&#039;s a minor bug, but it can be a real pain.<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts