473,385 Members | 1,772 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.

Having a Problem Trying to call two html iles to be loaded into two different frames

In my frame based page, I have a hyperlink in the top frame called
"header" which, when I click, should make two different pages to be
loaded and displayed into two different frames, namely "thumbnails"
frame and "main" frame simultaneously.

My framed page is defined as follows:

<frameset rows="15%,*,15%">
<frame src="headerWelcome.html" name="header" />
frameset cols="20%,*,20%">
<frameset rows="45%,55%">
<frame src="leftTopBanner.html" name="banner" />
<frame src="defaultThumbnails.html" name="thumbnails" />
</frameset>
<frame src="defaultMain.html" name="main">
<frame src="siteIntroduction.html" name="intro">
</frameset>
<frame src="footerCopyright.html" name="footer" />
</frameset>

My "headerWelcome.html" file looks like this:

<body>
<img src="Welcome.gif /><br>
<a href ="">Brisbane</a> | <a href ="">Sidney</a> | <a href
="">Port Moresby</a> | <a href ="">Lae</a> | <a href ="">Buka</a>
</body>

I know that can be acomplished via a Javascript function placed in
"headerWelcome.html" file and have anchor tag's href attribute set to
the function name as follows"

<a href="javascript: loadPages()">Brisbane</a> supposing loadPages() is
such function in the "headerWelcome.html" file.

My problem is I have difficulty specifying the names of the frames into
which the pages must load.

Please, help me achieve that.

Thousand thanks.

Jofio

Oct 7 '05 #1
3 1540
> "Jofio" <j9******@yahoo.com> wrote:
news:11**********************@g44g2000cwa.googlegr oups.com....

In my frame based page, I have a hyperlink in the top frame called "
header" which, when I click, should make two different pages to be
loaded and displayed into two different frames, namely "thumbnails"
frame and "main" frame simultaneously.

My framed page is defined as follows:

<snip>

My "headerWelcome.html" file looks like this:

<snip>

I know that can be acomplished via a Javascript function placed in "
headerWelcome.html" file and have anchor tag's href attribute set
to the function name as follows"

<a href="javascript: loadPages()">Brisbane</a> supposing
loadPages() is such function in the "headerWelcome.html" file.

My problem is I have difficulty specifying the names of the frames
into which the pages must load.

Please, help me achieve that.

parent.frames['thumbnails'].location.href='http://www.yahoo.com';
parent.frames['main'].location.href='http://www.google.com';

--
BootNic Friday, October 07, 2005 4:20 PM

Optimism and humor are the grease and glue of life. Without both of them we would never have
survived our captivity.
*Philip Butler, Vietnam POW*

Oct 7 '05 #2
Thanks I tried . This is my code:

<a href="javascript: void loadPages('Brisbane')">Brisbane</a>

and my function loadPages() is:

<script language="javaScript">
function loadPages(place){
switch(place){
case "Buka":
{
parent.frames['thumbnails'].location.href='footer.html';
parent.frames['main'].location.href='login.php';
break;
}
/* more case statements to test for other place */
..
}
}
</script>

It seem to be not working, however. Arguments passed in the call to
the loadPages() function may be wrongly called....

jofio

Oct 9 '05 #3
> "Jofio" <j9******@yahoo.com> wrote:
news:11**********************@f14g2000cwb.googlegr oups.com....

Thanks I tried . This is my code:

<a href="javascript: void loadPages('Brisbane')">Brisbane</a>

and my function loadPages() is:

<script language="javaScript">
function loadPages(place){
switch(place){
case "Buka":
{
parent.frames['thumbnails'].location.href='footer.html';
parent.frames['main'].location.href='login.php';
break;
}
/* more case statements to test for other place */
.
}
}
</script>

It seem to be not working, however. Arguments passed in the call to
the loadPages() function may be wrongly called....


<script type="text/javascript">
function loadPages(place){
switch(place){
case "goob":
{
parent.frames['thumbnails'].location.href='http://www.yahoo.com';
parent.frames['main'].location.href='http://www.google.com';
break;
}
}
}
</script>

<a href="javascript:void(this);" onclick="loadPages('goob');">Search</a>

--
BootNic Sunday, October 09, 2005 5:49 AM

Our earth is degenerate in these latter days; bribery and corruption are common; children no longer
obey their parents; and the end of the world is evidently approaching.
*Assyrian clay tablet 2800 B.C.*
Oct 9 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ck388 | last post by:
I am trying to open a frameset in a new window......where the frame called "main" shows the file called customerGeneral.aspx. I can't get it to work though...i always get something like...
3
by: krishna | last post by:
Below is the code. language = asp.net/vb.net private sub openW() sResult = sResult & "<script language=javascript> mywindow =...
42
by: Greg | last post by:
Hi, I've designed a bookmark in Ajax / PHP that I will put soon on sourceforge.net. But I've got an very tricky bug. I try it on some computers with Internet Explorer/Windows, Firefox...
18
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
7
by: Jeffery Small | last post by:
I have a hand-crafted set of HTML files. each file begins with the line: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> while the...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
6
by: August Karlstrom | last post by:
Hi everyone, I have some problems loading a page into a frame from a different frame. In Firefox and Explorer the lower frame displays "Test..." but in some older version of Safari it is left...
1
by: bbla32 | last post by:
Hi, I cannot figure out why everything from line var elem = doc.getElementsByName('keywords') in x.js is not executed. My goal is to set value of <input name=keywords ...which is in a.html...
3
meenakshia
by: meenakshia | last post by:
hi forum i m facing a problem regarding printing withing the frames page i have a main frame page. which has on the left the menu html page loaded and on the right the target content page. when i...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.