Re: A simple Question

GaRgL... wrote:

> here's the script
> 
> <SCRIPT LANGUAGE="JavaScript">
> <!--
> 
> function DoubleUpdate ( First , Second )
>   {
>   parent.frameone.location.href = First
>   parent.frametwo.location.href = Second
>   }
> 
> //-->
> </SCRIPT>
> 
> you can call it like this <A
> HREF="JavaScript:DoubleUpdate('firstlink','secondlink')"></A>
> 
> oh, by the way, there is a NASTY bug between explorer/navigator...
> explorer takes relative links from the point of the frame you want to
> update while navigator takes the frame from which you call the script...
> 

Actually, this question was addressed extensively this morning, Europe
time, but not posted to group as it is outside of usual concerns.

In any case, I wrote the following, which I believe is the most elegant
and I've tested on both NS3 and IE4. No SCRIPT tag or script URL is
necessary. It can all be done in the document with the addition of a 
single event handler. *location* could be *location.href*. 
--------------------

to update frames 2 and 3 from frame 1 in a frameset:

<A 
HREF="fourth.html" TARGET="frSecond" onClick="parent.frThird.location =
'fifth.html'">Load 2 other frames</A>

to update frame 2 and 3 from frame 2 in a frameset:

<A 
HREF="third.html" TARGET="frThird" onClick="location =
'second.html'">Load over me and the third frame</A>

or some variation.

-- 

Peter Belesis            Dynamic HTML Lab
peter@webreference.com   http://www.webreference.com/dhtml

Received on Monday, 18 August 1997 14:25:33 UTC