Hi.
I am having a small problem loading a page into an IFrame with JavaScript.
Basically, i have a single page (which i will call index) with an IFrame (which i will call content) embedded.
What i need is a link in the “index” page which a) reloads the index page and b) loads a [U]different
My problem is, once the index page reloads, the ORIGINAL IFrame file is loaded as well. I cannot get the IFrame to change to the new page.
Below is the sort of script i am trying to run
[CODE]
<html>
<script type=”text/javascript” language=”JavaScript”>
<!–
function loadFrames()
{
document.location.href = document.location.href + “?newParam=test”
window.main.location = “page-b.htm”;
return true
}
//–>
</script>
</head>
<body>
<table border=”0″ cellpadding=”3″ cellspacing=”0″ width=”100%” align=”center”>
<tr>
<td><a href=”#” onClick=”loadFrames(); return false”>Link</a></td>
</tr>
<tr>
<td><iframe src=”page-a.htm” name=”main”></iframe></td>
</tr>
</table>
</body>
</html>
Maybe i am missing something simple. Can anyone help me spot it?