How to refer to a function in a frame from another frame?

Discussion in 'Javascript' started by laredotornado@zipmail.com, May 21, 2007.

  1. Guest

    Hi,

    I have this master frameset page

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Account Creation</TITLE>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
    charset=ISO-8859-1">
    </HEAD>

    <frameset rows="0%, 100%">
    <frame src="creation_result.php" name="createAccount">
    <frame src="display_result.php" name="content">
    </frameset>

    </html>


    >From within the "createAccount" frame, I want to call a function

    defined in the content frame. The content frame's HTML is roughly as
    follows:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Account Creation</TITLE>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
    charset=ISO-8859-1">
    <link rel="stylesheet" type="text/css" href="../styles/styles.css">
    <script type="text/javascript" src="../scripts/util.php"></script>
    <script type="text/javascript" src="../scripts/util.js"></script>
    <script type="text/javascript">
    function setMsg(msg) {
    document.getElementById('m').innerHTML = msg;
    } // setMsg
    </script>
    </HEAD>
    <BODY>
    ....
    </body>
    </html>


    How do I refer to the "setMsg" function in the content frame from the
    other frame (named "createAccount"?

    Thanks, - Dave
     
    , May 21, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sullivan WxPyQtKinter
    Replies:
    8
    Views:
    284
    Kay Schluehr
    Mar 11, 2006
  2. joe klein
    Replies:
    1
    Views:
    118
    Atrax
    Sep 12, 2003
  3. Stone
    Replies:
    23
    Views:
    949
    Phil Carmody
    Jan 17, 2012
  4. George Sicherman[aes] MTD43D29

    can't refer to nested frame

    George Sicherman[aes] MTD43D29, Oct 12, 2004, in forum: Javascript
    Replies:
    1
    Views:
    74
    Thomas Hoheneder
    Oct 12, 2004
  5. Sisilla

    Refer to <div> from separate <frame>

    Sisilla, Nov 30, 2007, in forum: Javascript
    Replies:
    2
    Views:
    143
    Sisilla
    Nov 30, 2007
Loading...

Share This Page