PDA

Click to See Complete Forum and Search --> : NETSCAPE PROB:- Please Read This...


benski
Jan 29th, 2001, 09:25 AM
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!!???

sail3005
Jan 29th, 2001, 07:29 PM
maybe this will help, just an exapmle


<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>