Forum Moderators: open

Message Too Old, No Replies

problem loading another frame

         

wmbrae

5:47 am on Apr 4, 2008 (gmt 0)

10+ Year Member



The sample below works. It consists of 4 separate htm files.

Launch 01.htm creates 2 frames _L, _R and _R has a link which when pressed will load 03.htm into _L and 03.htm will load 04.htm into _R.

When all files are in the same directory it works
When 03.htm is stored in a sub-directory (called sub) below the other files, the load

parent._R.location.href = "04.htm"

doesn't work.

In 02.htm I specify (note in href= the addition of sub\

<a href="sub\03.htm" target="_L">load 03.htm into _L</a>

and when you click on the link load 03.htm into _L it loads 03.htm just fine but the script in the header doen't work.
Can anyone help?
Thanks.

<! 00.htm

<HTML>
<HEAD><TITLE>&nbsp</TITLE></HEAD>
<BODY> Opening screen _L </BODY>
</HTML>

<! 01.htm

<HTML>
<FRAMESET COLS="82%,*">
<FRAME NAME="_L" SRC="00.htm">
<FRAME NAME="_R" SRC="02.htm">
</FRAMESET>
</HTML>

<! 02.htm

<HTML>
<HEAD><TITLE>02</TITLE></HEAD>
<BODY>

<a href="03.htm" target="_L">load 03.htm into _L</a>

</BODY>
</HTML>

<! 03.htm

<HTML>
<HEAD><TITLE>test</TITLE><SCRIPT>

parent._R.location.href = "04.htm";

</SCRIPT></HEAD>
<BODY> Load 04.htm into _R </BODY>
</HTML>

<! 04.htm

<HTML>
<HEAD><TITLE>&nbsp</TITLE></HEAD>
<BODY> This is 04.htm in _R loaded from _L </BODY>
</HTML>

httpwebwitch

2:16 am on Apr 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, wmbrae!

I believe you're having a problem with absolute versus relative links. Try using absolute URLs in the href, then you won't have these issues with links from subdirectories.