Javascript & iframes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carl

    Javascript & iframes

    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?
  • Ivo

    #2
    Re: Javascript & iframes

    "Carl" <carl_mckie@hot mail.com> wrote in message
    news:b5ada61.04 02161921.5db1f8 85@posting.goog le.com...[color=blue]
    > 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?[/color]

    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.myfunct ion) parent.myfuncti on(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


    Comment

    • Michael Winter

      #3
      Re: Javascript &amp; iframes

      On 16 Feb 2004 19:21:31 -0800, Carl <carl_mckie@hot mail.com> wrote:
      [color=blue]
      > 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?[/color]

      Try reading the FAQ:



      Mike

      --
      Michael Winter
      M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

      Comment

      Working...