[Javascript] new to frames.

Mckinney, Lori K lkmckinn at ingr.com
Wed Oct 31 08:14:00 CST 2001


Scott,

You can call a function in the page of the bottom frame from the top frame.
Something like top.bottom.xyz.  That works for IE, NN may be slightly
different.

You should definitely not use top as the name of your first frame since top
is used to identify the topmost ancestor window.

For example, 

main.htm
  <HTML>
  <FRAMESET rows="50%,*">
  <FRAME id="topFrame" src="one.htm">
  <FRAME id="bottomFrame" src="two.htm">
  </FRAMESET>
  </HTML>

one.htm
  <HTML>
  <BODY>
  <BUTTON onclick="top.bottomFrame.sayHi()">Say Hi</BUTTON>
  </BODY>
  </HTML>

two.htm
  <HTML>
  <HEAD>
  <SCRIPT type="text/javascript">
  function sayHi()
  {
    alert ("hi from the bottom frame")
  }
  </SCRIPT>
  </HEAD>
  <BODY>
  Page 2
  </BODY>
  </HTML>


-----Original Message-----
From: Scott.Wiseman [mailto:swiseman at remax-cahi.com]
Sent: Tuesday, October 30, 2001 6:57 PM
To: 'javascript at LaTech.edu'
Subject: [Javascript] new to frames.


how do I do a submit to the bottom frame with windows poping open...


I have a submit button on the top frame, I want this submit button
to cause action on the bottom frame.

Scott


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<frameset rows="50%,*">
  <frame name="top" src="TransactionForm.asp">
  <frame name="bottom" src="TransactionFormDetail.asp">
  <noframes>
  <body>

  <p>This page uses frames, but your browser doesn't support them.</p>

  </body>
  </noframes>
</frameset>

</html>


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list