Results 1 to 2 of 2

Thread: NETSCAPE PROB:- Please Read This...

  1. #1

    Thread Starter
    Lively Member benski's Avatar
    Join Date
    Sep 1999
    Location
    UK
    Posts
    126
    Does anyone know how to access properties of a layer or div that contains another (nested) div?

    As soon as I put another div within the div whose properties I am changing, that div disappears (not the nested div, the parent div!)

    Help!!???

  2. #2
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    maybe this will help, just an exapmle

    Code:
    <html>
    <head>
    <title>test</title>
    </html>
    <body>
    
    <form>
    <input type="button" onClick="swap()" value="Change obj 1">
    <input type="button" onClick="swap1()" value="Change obj 2">
    </form>
    
    <script>
    
    function swap(){
    
    document.obj1.document.write("Written to obj 1");document.obj1.document.close();
    
    }
    
    function swap1(){
    
    document.obj1.document.obj2.document.write("Written to obj 
    
    2");document.obj1.document.obj2.document.close();
    
    }
    
    </script>
    <div id="obj1" style="position:absolute">obj 1<div id="obj2" style="position:absolute">obj 2</div></div>
    </body>
    </html>

Posting Permissions

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



Click Here to Expand Forum to Full Width