loonatik
05-22-2003, 10:10 PM
I have a page (index.html) with an iframe (main.html). I want to use javascript to change the location of the iframe when the page loads.
<head>
<script>
self.main.location="test2.html";
</script>
</head>
<body>
<iframe width=600 height=300 name="main" src="main.html"></iframe>
</body>
I've tried a number of variations i.e.
document.main.location...
top.main.location...
etc.
Is it possible? Thanks.
<head>
<script>
self.main.location="test2.html";
</script>
</head>
<body>
<iframe width=600 height=300 name="main" src="main.html"></iframe>
</body>
I've tried a number of variations i.e.
document.main.location...
top.main.location...
etc.
Is it possible? Thanks.