By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,636 Members | 1,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,636 IT Pros & Developers. It's quick & easy.

Calling function in oyher frame

P: n/a
Hi everybody,

I met an interesting problem.

On my site people can browse through many pages that are viewed in a set of
frames.
Now I would like to avoid reloading the rather large .js file everytime a
new page is viewed. (takes a few seconds on an ordinary telephone
connection).
Therefore I load it at the central entry-point once when I fill the frame
kop (referred to as 'top.kop').

Now from the different other frames, when they are loaded, they call a
setup-routine with:
<BODY ONLOAD="top.kop.setup(document)">

This works fine in IE, but not in NN 7.0

NN does not recognise setup() as a function available in top.kop

How come and what can be done about it...

By the way, merry Christmas, everybody!!!
Don't give up your family-life for questions like the above...
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Peter Crom" <pa****@bart.nl> wrote in
news:rs*****************@typhoon.bart.nl:
On my site people can browse through many pages that are viewed in a
set of frames.
Now I would like to avoid reloading the rather large .js file
everytime a new page is viewed. (takes a few seconds on an ordinary
telephone connection).


You can achieve that by linking to the script (<script src="...">) rather
than including its source in the individual pages. That way it will be
cached the first time it's loaded. It will also make maintaining the
script easier, since any changes only have to be made in one place.
Jul 20 '05 #2

P: n/a
Peter Crom wrote:
Hi everybody,

I met an interesting problem.

On my site people can browse through many pages that are viewed in a set of
frames.
Now I would like to avoid reloading the rather large .js file everytime a
new page is viewed. (takes a few seconds on an ordinary telephone
connection).
Therefore I load it at the central entry-point once when I fill the frame
kop (referred to as 'top.kop').

Now from the different other frames, when they are loaded, they call a
setup-routine with:
<BODY ONLOAD="top.kop.setup(document)">

This works fine in IE, but not in NN 7.0

NN does not recognise setup() as a function available in top.kop

How come and what can be done about it...

By the way, merry Christmas, everybody!!!
Don't give up your family-life for questions like the above...


This is because, if the frame is named "kop", you need to use the more
cross-browser way to access it (the other notation is specific to IE):

top.frames["kop"] ... which yields top.frames["kop"].setup(document)

Hope I got it right... without seeing the code, it is difficult to tell
for sure.

Brian

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.