Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > refreshing two frames with only one click

Reply
Thread Tools

refreshing two frames with only one click

 
 
sjoerd
Guest
Posts: n/a
 
      09-26-2003
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


 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      09-26-2003


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/

 
Reply With Quote
 
 
 
 
Andoni
Guest
Posts: n/a
 
      09-26-2003
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" <(E-Mail Removed)> wrote in message
news:bl1duk$5sj$(E-Mail Removed)1.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
>
>



 
Reply With Quote
 
Daniel Kirsch
Guest
Posts: n/a
 
      09-26-2003
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

 
Reply With Quote
 
Chef Blair
Guest
Posts: n/a
 
      10-03-2003
> 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>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
* Loading two frames on one click on the link Mc21 HTML 3 11-13-2006 10:51 AM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net 1 08-04-2006 01:13 PM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net Web Controls 0 08-03-2006 12:29 PM
Opening two frames on one click Kailas Javascript 1 08-02-2005 05:25 PM
frames alternative for refreshing only part of page? Jules HTML 7 09-06-2004 09:45 PM



Advertisments