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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form post with input values

Status
Not open for further replies.

RichS

Programmer
Apr 24, 2000
380
US
I have a frameset with two frames, one over the other. In the top frame i have text boxes and a submit button in a form. How do I send the values in the text boxes in the top frame to variables in the bottom frame?

the code for the top frame currently looks like:

<form name=&quot;frmSearch&quot; method=&quot;post&quot; action=&quot;parent.frames['Bottom'].location='Test.asp';&quot;>
<DIV STYLE=&quot;LEFT: 0px; POSITION: absolute; TOP: 200px&quot;>
<table width=&quot;800&quot; align=&quot;center&quot; border=&quot;1&quot; cellspacing=&quot;0&quot; bcolor=&quot;white&quot;>
<tr><td colspan=8 class=largeheader>Possible Matches</td></tr>
<tr>
<td class=smallheader>Payee Name</td>
</tr>
<tr>
<td class=smallheader><input type=&quot;text&quot; name=&quot;txtPayeeName&quot; size=&quot;35&quot; value=&quot;--Search in this row--&quot;></input></td>
</tr>
</table>

</DIV>
<DIV STYLE=&quot;LEFT:208px; POSITION:absolute; TOP:203px;&quot;>
<input type=&quot;submit&quot; value=&quot;Search&quot;>
<input type=&quot;hidden&quot; name=&quot;txtTableType&quot; value=&quot;Search&quot;>

</DIV>
</form>


And the page that i am posting to is currently:


<%
dim sType

sType=request.form(&quot;TableType&quot;)
sPayeeName=request.form(&quot;txtPayeeName&quot;)

response.write &quot;Value: &quot; & sType & &quot; Payeename=&quot; &
response.end

%>
<html>
<head>
<title>Test</title>
</head>

<body>
</body>
</html>



The frameset is constructed like:


<frameset rows=&quot;275,*&quot; framespacing=&quot;0&quot; frameborder=&quot;0&quot;>
<frame src=&quot;MatchFrameTop.asp?<%=sQueryString%>&quot; name=&quot;Top&quot; id=&quot;Top&quot;
frameborder=&quot;0&quot; scrolling=&quot;auto&quot; noresize marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
<frame src=&quot;Test.asp&quot; name=&quot;Bottom&quot; id=&quot;Bottom&quot;
frameborder=&quot;0&quot; scrolling=&quot;Auto&quot; noresize marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
</frameset>


any help is greatly appreciated.

Rich
 
Instead of altering your action, just set it equal to your filename and put a target in the form tag just as you would in an href. ie:
Code:
<form name=&quot;frmSearch&quot; method=&quot;post&quot; action=&quot;Test.asp&quot; target=&quot;whatever_the_frame_is_named&quot;>
 
thanks for the reply. that works but it brings up Test.asp in its own window rather than reloading the bottom frame. Maybe I missed something, here is what I changed:

<form name=&quot;frmSearch&quot;
method=&quot;post&quot;
action=&quot;Test.asp&quot;
target=&quot;parent.frames['Bottom'].location='Test.asp';&quot;>
 
I get it now.

<form name=&quot;frmSearch&quot;
method=&quot;post&quot;
action=&quot;Test.asp&quot;
target=&quot;Bottom&quot;>


Just like you said. Thanks

Rich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top