Forum Moderators: open
Am having issues with the javascript code below in firefox:
<script language="javascript">
function changeurl(whichpage){
document.getElementById['testlayer'].document.getElementById['testiframe'].src=whichpage + ".html";
}
</script>
when it references:
<div id=testlayer name="testlayer" width=200 height=200 position=absolute>
<img name="checkimg" id="checkimg" width=30 height=30 src="http://www.thesun.co.uk/picture/0,,2005230215,00.gif">
<iframe id="testiframe" width=150 height=150 name="testiframe" src="a.html"></iframe>
</div>
<br><br><BR><BR><BR><br><br><BR><BR><BR><a href="javascript: changeurl('b');">hello</a>
Basically the url of the nested Iframe should change from a.html to b.html but doesn't - probably an easy fix but hopefully someone out there can solve my problem :) Cheers!