|
-
Jan 29th, 2001, 10:25 AM
#1
Thread Starter
Lively Member
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!!???
-
Jan 29th, 2001, 08:29 PM
#2
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|