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!

Form redirect to the submited record

Status
Not open for further replies.

aarellano

MIS
Oct 22, 2007
168
US
Hello,

I have a form that has 3 input fields

order
op seq
machine

what I am trying to do is when I submit the form, redirect to a view of the submited page
I was trying this out
form page (created the input page with dreamweaver)
Code:
<body>
/this is part of the code that comes first
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "form1") Then

  MM_editConnection = MM_schedule_STRING
  MM_editTable = "DAVIESF.COMPSCD"
  MM_editRedirectUrl = "[URL unfurl="true"]http://mysite/test/pr.asp?ORD=ORD"[/URL]
  MM_fieldsStr  = "ORD|value|OPSEQ|value|MACRN|value|RECNO|value"
  MM_columnsStr = "ORD|',none,''|OPSEQ|',none,''|MACRN|',none,''|RECNO|none,none,NULL"





<form method="post" action="<%=MM_editAction%>" name="form1">
  <table align="center">
    <tr valign="baseline">
      <td nowrap align="right">ORD:</td>
      <td><input type="text" name="ORD" value="" size="32">
      </td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">OPSEQ:</td>
      <td><input type="text" name="OPSEQ" value="" size="32">
      </td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">MACRN:</td>
      <td><input type="text" name="MACRN" value="" size="32">
      </td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">RECNO:</td>
      <td><input type="text" name="RECNO" value="1" size="32"  >
	  


      </td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">&nbsp;</td>
      <td><input type="submit" value="Insert record">
      </td>
    </tr>
  </table>
  <input type="hidden" name="MM_insert" value="form1">
</form>
<p>&nbsp;</p>
</body>
</html>

On the pr.asp page
I have put the following thinking that it would pass the ord variable

Code:
<%

    ordno = Request.querystring("ord")
    
%>
the ordno is the order field in the pr.asp page and the ord is the order field in the inputl.asp page

So when I submit my page my url looks like this


how could I go about doing this??
 
Look at the <form> tag, in particular the method property of the <form> tag.

There are 2 possible values: GET and POST

One of them passes the form field values in the URL's QueryString and the other embeds the values in the HTTP Request header.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top