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

J

Jofio

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
 
B

BootNic

Jofio said:
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*
 
J

Jofio

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
 
B

BootNic

Jofio said:
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.*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top