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

Javascript & iframes

P: n/a
I want to load a javascript file on a root page with various iframes,
then call the javascript functions from the root page to be displayed
in the iframes. Any idea how to do this?
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ivo
"Carl" <ca********@hotmail.com> wrote in message
news:b5*************************@posting.google.co m...
I want to load a javascript file on a root page with various iframes,
then call the javascript functions from the root page to be displayed
in the iframes. Any idea how to do this?


Both the script and calls are on the same page? That 's business as usual,
isn't it?
To call a function scripted in a parent from within a framed document, try

if (parent.myfunction) parent.myfunction(myvar);

The if-statement checks whether the function actually exists before calling
it. Once you know the various required files have loaded, this may not be
necessary.
HTH
Ivo
Jul 20 '05 #2

P: n/a
On 16 Feb 2004 19:21:31 -0800, Carl <ca********@hotmail.com> wrote:
I want to load a javascript file on a root page with various iframes,
then call the javascript functions from the root page to be displayed
in the iframes. Any idea how to do this?


Try reading the FAQ:

http://www.jibbering.com/faq/#FAQ4_8

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.