Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a sub procedure from a different frame 1

Status
Not open for further replies.

Pango

Programmer
Mar 2, 1999
1
0
0
US
I have two frames. In frame 1 I have a sub procedure that I would like to call from frame two. The sub procedure in frame 1 displays a form field value that exists in frame 2. <br>
<br>
The sub procure is: <br>
<br>
FRAME 1 - <br>
Sub dologin(txtLoginID) <br>
Alert txtLoginID <br>
End Sub <br>
<br>
FRAME 2 - <br>
<br>
&lt;FORM NAME=login&gt; <br>
Enter Your Login ID: <br>
&lt;INPUT TYPE="TEXT" NAME="txtLoginID"&gt; <br>
&lt;INPUT TYPE=BUTTON NAME="DoLogin" VALUE="Next" onClick="doLogindocument.login.txtLoginID.value)"&gt; <br>
&lt;/FORM&gt; <br>
<br>
Any help would be appreciated.
 
to call a sub from a different frame you just qualify the sub name with parent.framename. For example, if frame 1 was named Frame1 in the frameset, to call dologin from frame2, you would say <br>
&lt;script language="vbscript"&gt;<br>
parent.frame1.dologin("some text")<br>
&lt;/script&gt;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top