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!

Submitting a Form from a different Frame

Status
Not open for further replies.

durell

Programmer
Feb 4, 2002
12
US
I have a need to have a frame with a form in it (no problem) ..but the "submit" button is on another frame. Is this even possible....if so how do I handle it...
 
i guess its easy.

u can change the contents of different frames from any frame using parent.frames[1], etc.

suppose u have 2 frames, they get numbered as frames[0] and frames[1]. assume u call the form in one frame as 'frm'. now in the onclick event of the other frame where the submit button is, put this code:

<input type=submit onclick='parent.frames[1].document.frm.submit()'>
this should do the trick. (may b i made some small mistake, but just fool around with parent.frames[] and u'll get it).

luv
Karthik.
 
Not being that comfortable with frames..your suggestion was lost...I appreciate the attempt ..let me give you some more detail... the following is some cutdown code..the submit button should submit the data in the form from Arequest.asp to Frame_Detail.asp.....is this do-able???

<div id=&quot;ErrorMessages&quot; style=&quot;position:absolute; width:758px; height:30px; z-index:3; left: 15px; top: 1px&quot;>
<FORM ACTION=&quot;Frame_Detail.asp&quot; METHOD=POST&quot;>
<table width=&quot;100%&quot; border=&quot;10&quot;>
<tr>
<td>
<table corder=0 width=100%>
<tr>
<td valign=middle align=left><input type=submit Name=Submit value=Submit></td>
<td valign=middle align=&quot;center&quot; valign=&quot;middle&quot;><font size=2 color=red><b>Access Request Processing Messages from the System</b></font></td>
<td align=right valign=middle><INPUT TYPE=&quot;Reset&quot; VALUE=&quot;Reset&quot;></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id=&quot;Layer2&quot; style=&quot;position:absolute; width:758px; height:824px; z-index:2; left: 15px; top: 60px&quot;>
<table border=10 width=100%>
<tr>
<td>
<IFrame src=&quot;ARequest.asp&quot; width=&quot;728&quot; height=&quot;460&quot; scrollong=&quot;auto&quot; frameBorder=0>
</IFrame>
</td>
</tr>
</table>
</form>
</div>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top