471,119 Members | 1,362 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

refreshing two frames with only one click

Hi,

I have a web welcome-page consisting of three frames. On the left there is
an index. The two others (above each other on the right of the screen)
contain data related to the index-items.

I'm looking for the possibility to refresh the two related frames when an
index-item in the frame on the left is clicked.

I tried this with the HREF-command but this only works for one frame at the
time.
<a href = "info1.htm" target = right_above>index-item_1</a>
or
<a href = "info2.htm" target = right_under>>index-item_1</a>

Id there a way to solve this in java-script? Or perhaps HTML?

Thanks,

Sjoerd
Jul 20 '05 #1
4 4333


sjoerd wrote:
Hi,

I have a web welcome-page consisting of three frames. On the left there is
an index. The two others (above each other on the right of the screen)
contain data related to the index-items.

I'm looking for the possibility to refresh the two related frames when an
index-item in the frame on the left is clicked.

I tried this with the HREF-command but this only works for one frame at the
time.
<a href = "info1.htm" target = right_above>index-item_1</a>
or
<a href = "info2.htm" target = right_under>>index-item_1</a>

Id there a way to solve this in java-script? Or perhaps HTML?


<a href="info1.htm"
target="right_above"
onclick="if (parent.frames.right_under) {
parent.frames.right_under.location.href = 'info2.htm';
}
return true;">

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Yes, in both actually.
In JavaScript you can use the button/link click to run a method which does a
location.replace with the particular page names you want to put in there.

In html you can simply have a two frame page in which the second
(right-hand) frame is a frameset of two frames one on top of the other.

Hope that helps,

Andoni.
"sjoerd" <iw*@iwi.myweb.nl> wrote in message
news:bl**********@news2.tilbu1.nb.home.nl...
Hi,

I have a web welcome-page consisting of three frames. On the left there is
an index. The two others (above each other on the right of the screen)
contain data related to the index-items.

I'm looking for the possibility to refresh the two related frames when an
index-item in the frame on the left is clicked.

I tried this with the HREF-command but this only works for one frame at the time.
<a href = "info1.htm" target = right_above>index-item_1</a>
or
<a href = "info2.htm" target = right_under>>index-item_1</a>

Id there a way to solve this in java-script? Or perhaps HTML?

Thanks,

Sjoerd

Jul 20 '05 #3
sjoerd wrote:
I'm looking for the possibility to refresh the two related frames when an
index-item in the frame on the left is clicked.

I tried this with the HREF-command but this only works for one frame at the
time.
<a href = "info1.htm" target = right_above>index-item_1</a>
or
<a href = "info2.htm" target = right_under>>index-item_1</a>

Id there a way to solve this in java-script? Or perhaps HTML?
Not in HTML.
Using JavaScript you might try:

<a href="info1.htm"
target="right_above"
onclick="
top.frames['right_above'].location.href='info1.htm';
top.frames['right_under'].location.href='info2.htm';
return false;"index-item_1</a>


HTH
Daniel

Jul 20 '05 #4
> I have a web welcome-page consisting of three frames. On the left there is
an index. The two others (above each other on the right of the screen)
contain data related to the index-items.

I'm looking for the possibility to refresh the two related frames when an
index-item in the frame on the left is clicked.

I tried this with the HREF-command but this only works for one frame at the time.
<a href = "info1.htm" target = right_above>index-item_1</a>
or
<a href = "info2.htm" target = right_under>>index-item_1</a>

Id there a way to solve this in java-script? Or perhaps HTML?

Thanks,

Sjoerd


Try this, MenuBar and Content are the Frame names

<script language="JavaScript" type="text/javascript">
function show()
{
parent.MenuBar.location.href='menu0.shtml';
parent.Content.location.href='option.shtml';
}
</script>
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Stokesy | last post: by
4 posts views Thread by Jamie Jackson | last post: by
1 post views Thread by Evan | last post: by
7 posts views Thread by dj Bass | last post: by
2 posts views Thread by Schraalhans Keukenmeester | last post: by
1 post views Thread by ugo.matrangolo | last post: by

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.