473,378 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Calling function in oyher frame

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
2 1633
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alex Lyman | last post by:
Does anyone have any code handy (or know what a good direction for me to head in), to call functions, if you have an address of the function, its declspec (for my app, it's limited to _stdcall and...
3
by: Twinkletoes | last post by:
Hello people, my first post here... *wave* I need to know how to call a function in a different document. At the moment I've tried onFocus but I'm kinda in over my depth. Perhaps if I tell you...
3
by: John Bokma | last post by:
I have two windows in a frame. I want to be able that each can open a pop up window and that the handle to that window can be stored somewhere, so that each can talk to the pop up. is it...
3
by: Andrew Poulos | last post by:
In a frameset I have this: window.onload = function() { frames.onunload = function() { alert('I'm going now'); } } when frames unloads I'm expecting the alert to be called but it never...
2
by: Don | last post by:
This may seem like an odd question, but is it possible to get the name of the class & function that is calling a function of another class? e.g. Public Class CallerName Public Shared Function...
2
by: M B HONG 20 | last post by:
Hi all - I am working on a web application and have run into a problem. From a main window (Window1) I open a child window (Window2), and from that child window I open a grandchild window...
2
by: Mongoose7 | last post by:
Hi, I am using vc7 to call a dll function from another dll. The function seems to execute correctly (it writes binary data to the registry) but when it comes out of the function, and tries to...
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
15
by: dspfun | last post by:
Hi, Is it possible to print the function name of the calling function? For example, f1() and f2() both calls f3(), in f3() I would like to print the name of the function calling f3() which...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.