refreshing two frames with only one click

S

sjoerd

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
 
M

Martin Honnen

sjoerd said:
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;">
 
A

Andoni

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.
 
D

Daniel Kirsch

sjoerd said:
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
 
C

Chef Blair

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>
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top