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

Querystrings in Form Action?

Status
Not open for further replies.

CJAI

MIS
Oct 21, 2003
224
0
0
US
I'm trying to use a query string in my form action and it is not working (I cant request the querystring from another page and get any value).

Heres my code, note that I have tried POST and GET for the form methods and neither worked

Code:
<% while not rs.eof %>
<tr class='listText'>
[b]<form action="mngrDecision.asp?m=<% rs("documentTitle") %>" method='get'>[/b]
  <td valign='top'><%= rs("documentTitle") %>
</td>
<td valign='top'><a href='<%= rs("filePath") %>' target='_blank'><%= rs("filePath") %></a>
</td>
<td valign='top'><%= rs("submittedBy") %>
</td>
<td valign='top'><%= rs("submittedDate") %>
</td>
<td valign='top'>
<input type='submit' name='submit' value='Approve'><br>
<input type='submit' name='submit' value='Dont Approve'>
</td>	
</form>
</tr>
  <tr>
	<td colspan='5'><hr>
	</td>
  </tr>
<% rs.movenext
wend %>
 
I fixed the typo up there and it still doesn;t work
 
Use a hidden field named "m" as the first item in the form.

Chris.

Indifference will be the downfall of mankind, but who cares?
 
Change the double quotes on the action to single quotes. It is taking the double quotes in documentTitle as the end of the string. Also add a equal in the asp part. And you do not have to do this, but I prefer to use POST to make a smaller querystring instead of GET.
Code:
<form action=[red]'[/red]mngrDecision.asp?m=<%[red]=[/red]rs("documentTitle") %>[red]'[/red] method='[red]POST[/red]'>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top