Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > How to refer to a function in a frame from another frame?

Reply
Thread Tools

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

 
 
laredotornado@zipmail.com
Guest
Posts: n/a
 
      05-21-2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Is there any way to refer to another array in qsort's compare function? Stone C Programming 23 01-17-2012 10:35 AM
How to refer to the function object itself in the function per se? Sullivan WxPyQtKinter Python 8 03-11-2006 11:05 PM
can't refer to nested frame George Sicherman[aes] MTD43D29 Javascript 1 10-12-2004 09:43 PM
need to refer to a function in another website on IIS joe klein ASP General 1 09-12-2003 05:42 AM



Advertisments