use of document.layers

Results 1 to 2 of 2

Thread: use of document.layers

  1. #1
    Join Date
    Dec 1969

    Default use of document.layers

    Hello<BR><BR>I have some JavaScript which references something like<BR><BR><BR><BR>I&#039ve moved the actual layer (SPAN tagged) into a table and now the object reference does not work.<BR><BR>can someone tell me how to reference it please - MSDN was not much help to me!<BR><BR>thanks

  2. #2
    jason Guest

    Default RE: use of document.layers

    the reason MSDN was of no help is because document.layers[] is a non-standard property implemented by netscape only. you need to think cross platform. <BR><BR>in IE use this :<BR>document.all[&#039myLayer&#039]<BR><BR>in NN use :<BR>document.layers[&#039mylayer&#039] (unless it&#039s within another layer, in which case netscape treats layers as windows and you need to reference it as if it&#039s a frame (following me? probably not)<BR><BR>For Mozilla (Netscape 6) or other DOM compliant browsers use<BR><BR>var layers = document.getElementsByTagName("div") // or &#039span&#039<BR>layers[&#039mylayer&#039]<BR><BR><BR>jason<BR>

Posting Permissions

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