473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

problem loading another frame

3
i'm a total newbie, been at this for 3 days.

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

Lauch 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]<HTML>
<HEAD><TITLE>&nbsp</TITLE></HEAD>
<BODY> Opening screen _L </BODY>
</HTML>
[/HTML]
<! 01.htm

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

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

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

</BODY>
</HTML>
[/HTML]

<! 03.htm

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

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

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

<! 04.htm

[HTML]<HTML>
<HEAD><TITLE>&nbsp</TITLE></HEAD>
<BODY> This is 04.htm in _R loaded from _L </BODY>
</HTML>[/HTML]
Apr 4 '08 #1
3 1116
hsriat
1,654 Expert 1GB
Back slashes are not used here.
Replace sub\ with sub/


Harpreet
Apr 4 '08 #2
wmbrae
3
Back slashes are not used here.
Replace sub\ with sub/
Harpreet
Thanks to acoder for cleaning up my post.

Thanks to Harpereet for your response.
I didn't uderstand it at first, but I tried it out.

in 02.htm, the \ worked in
<a href="sub\03.htm" target="_L">load 03.htm into _L</a>
but based on the response, I changed it to
<a href="sub/03.htm" target="_L">load 03.htm into _L</a>
it worked also but with the same result the load _R didn't work.

the big difference was in 03.htm, where i changed

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

to

parent._R.location.href = "c:/04.htm";

the page was loaded.

Thank-you
Apr 4 '08 #3
hsriat
1,654 Expert 1GB
Try parent._R.src = "04.htm";
or parent.frames['_R'].src = "04.htm";

And one more thing. Its &nbsp; not &nbsp (don't forget the semi-colon in the end)

Regards,
Harpreet
Apr 4 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: flupke | last post by:
Hi, i need to develop a gui which will load several "windows" depending on what the users selects in the menu and i thought i could accomplish this with panels. What i'm trying to do to test...
1
by: Alex Hunter | last post by:
is there a way to make one frame on a page load completely before the other frame starts loading?
13
by: elad | last post by:
Hi The Menu doesn't work properly when I have 2 frame and the Menu popup frame=document target frame, when I choose item in the menu the doc opened and the menu get stuck. Here is the code...
4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
1
by: Brandon | last post by:
A newbie question for you all: Suppose you have a webpage with two frames: a main frame, and a second frame. You have several hyperlinks to other websites in the second frame. What you want is...
2
by: Don | last post by:
From within the "main" frame, using JS, I'm trying to copy a couple variables and arrays from the "header" frame into the "main" frame. I've incorporated a couple "alert" statements to test the...
13
by: Giggle Girl | last post by:
Hi there, I am having a problem with the behavior of Firefox, where lefthand column content is not resized properly after it is "collapsed" and then "re-expanded". An online demo is available...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.