Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Flash2: forcing a loading order with onLoad="changeWindowContents('new.html')"
From: Andrew Ayres
Date: Sun, 24 May 1998 18:00:29 +0100

Hi,

My thanks to Jason, and John, for their help - it is very much appreicated.
I've tried your Javascript, and it works for IE4 and Communicator. With
Netscape 2.02 and 3, however, I get a Javascript error, "body is not defined"
("body" being the name of my right frame). Is this because the Javascript
is of
a later version? Is there any way to create a solution that works for Netscape
2.02+ and IE3.02+ ?

cheers, Andrew

The Javascript I used:

<SCRIPT language="JavaScript"><!--

function changeWindowContents(newURL){

body.location.href = newURL;

}

// -->
</SCRIPT>

</HEAD>
<FRAMESET BORDER=0 FRAMESPACING=0 FRAMEBORDER="no" BORDER="0" COLS="137,*"
onLoad="changeWindowContents('final-right.html')">
<FRAME NAME="left" SRC="left.html" SCROLLING="no" MARGINWIDTH="2"
MARGINHEIGHT="2" FRAMEBORDER="no" BORDER="0" NORESIZE>
<FRAME NAME="body" SRC="dummy-right.html" SCROLLING="auto" MARGINWIDTH="2"
MARGINHEIGHT="2">
</FRAMESET>

<BODY>

nb: I put the function definition inside the HEAD. when I put the function
definition inside the frameset I get, "changeWindowContents is not defined"

Jason wrote:
<SCRIPT language="JavaScript"><!--
function changeWindowContents(newURL){
rightFrame.location.href = newURL;
}

// -->
</SCRIPT>
place this inside the <FRAMESET> tag of your main frameset.
rightFrame is the name of the frame that you want to change the location of.
<FRAMESET other_stuff_goes_here onLoad="changeWindowContents('new.html')">
note that you don't need parent.rightFrame.location.href, instead
just rightFrame.location.href, since the function is located in the top
level frameset document. Your frameset will load, with its initial
document, and then the new one will load based on the function above
which gets called when the frameset is loaded. new.html is the name of
the file you want to load in the frame.
Hope that helps,
Jason

> At 03:58 PM 5/22/98 -0400, John wrote:
> >For Flash 2 JavaScript must be enabled:
> >Load a blank or Static logo in the right frame.
> >Replace the contents of the right frame with the Spaghetti using onLoad
> >in frameset. onLoad in the frameset will not execute until all the
> >frames are loaded. In your case the left and right(a temporary blank or
> >Logo page).
> >John Croteau <croteauaterols [dot] com (mailto:croteauaterols [dot] com)>croteauaterols [dot] com (mailto:croteauaterols [dot] com)



------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  Re: Flash2: forcing a loading order with, Jason Nugent

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]