Results 1 to 2 of 2

Thread: Calling Javascript functions between frames

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254
    Hi,
    is it possible to call a javascripts function in one frame to execute in another? I have been working ( read as struggling ) with a small project which has some borrowed js files (http://www.geocities.com/Paris/LeftBank/2178/ )containing javascript functions for a navigation system.

    As expected if the user clicks on a node ( in the navigation frame ) it triggers an event in the javascript program to open / close the node, however, to make the navigation system consistent I want to be able to kick the events of from another frame ( the main frame ) in the browser.

    This question is a continuation of the questions posted yesterday / day before.


    The source below is in the main frame. I am presuming that this is executed in this ( the main )frame, but needs to be executed in the navigation frame. This is the crux f my question, how?

    Thanks in advance

    Lenin.


    <head>
    <script language="javascript" src="ftiens4.js"></script>
    <LINK rel="stylesheet" type="text/css" href="../StyleSheets/RMC2.css">
    </head>

    <body>
    <a href="../Regions/ListRegions.asp" onclick="javascript:clickonNode(1);"><img src="../regions/images/Readymix.gif" border="0"></a>
    </body>

  2. #2
    Member
    Join Date
    Sep 2000
    Posts
    49
    I think this would be the best way:

    Have your ftiens4.js file included in your NAVIGATION html page.

    Assuming you have named your navigation frame "nav", in your MAIN html page put this:
    Code:
    <a href="../Regions/ListRegions.asp" onClick="parent.nav.clickonNode()">
    <img src="../regions/images/Readymix.gif" border="0">
    </a>
    I think that is what you are looking for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width