I'm trying to change the src of an ilayer in the parent document from a link inside the
ilayer. I'm not able to get it to work. All that happens is Netscape 4 crashes. This is
for Netscape 4 only.
For example, here is the main page:
<html>
<head>
<script type="text/javascript">
function updateILayer(ob j) {
parent.document .layers["layer1"].src = obj.href;
}
</script>
</head>
<body>
<ilayer name="layer1" id="layer1" src="home.htm">
</ilayer>
</body>
</html>
And here's the home.htm src:
<html>
<head>
</head>
<body>
Click this link to go to test page:
<a onClick="parent .updateILayer(t his);" href="test.htm" >test</a>
</body>
</html>
And here's the test.htm src:
<html>
<head>
</head>
<body>
Click this link to go to home page:
<a onClick="parent .updateILayer(t his);" href="home.htm" >home</a>
</body>
</html>
Comment