By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,793 Members | 1,269 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,793 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
> "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

P: n/a
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

P: n/a
> "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 discussion thread is closed

Replies have been disabled for this discussion.