I have two frames in index.html:
<frameset cols="165,*">
<frame name="NCTnav" src="NCTnavHome.htm" scrolling="auto">
<frame name="NCTmain" src="http://www.yahoo.com">
</frameset>
from frame "NCTnav", I have a link, when I click this link, I need to load http://www.google.com (for example) into frame "NCTmain". The code in NCTnavHome.htm like:
<script language="JavaScript" type="text/JavaScript">
function displaySelection(URL) {
window.parent.frames[1].document.location.href = URL;
} // displaySelection
</script>
<TITLE>NCTnavHome.htm</TITLE>
</HEAD>
<BODY>
<A HREF="javascript:displaySelection('http://www.google.com');">test</A>
</BODY>
</HTML>
When I click this link, I got JavaScript error "Access is Denied". Even if I want to load a sample html on the web server instead of www.google.com, I got same error message. It seems no way to change url in one frame from a different frame.
Can anybody help me on this issue?
Thanks a lot in advance.