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

Getting values from form for fields where radio input selected.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have an active server page that returns a table from a recordset with the first column containing a hidden input with the primary key from the table and a radio input. I am trying to delete form the table the record that has the radio input selected when th user clicks on the submit button. I have the sql stored procedure complete. I am just trying to figure out how to get the primary key value that is associated with the selected radio input to the asp page that calls the stored procedure.
 
Try this...

default.html -
Code:
'asp page creates the html outputs something to the effect of...
<html>
<body>
<form id=frmForm name=frmForm method=&quot;POST&quot; action=&quot;delete.asp&quot;>
 primary key 1<input type=radio id=radGroup name=radGroup value=&quot;primary key 1&quot;><br>
 primary key 2<input type=radio id=radGroup name=radGroup value=&quot;primary key 2&quot;><br>
 primary key 3<input type=radio id=radGroup name=radGroup value=&quot;primary key 3&quot;><br>
 <input type=submit value=&quot;Submit&quot;>
</form>
</body>
</html>

delete.asp -
Code:
<html>
<body>
<%
 Dim radGroup
 radGroup = Request.Form(&quot;radGroup&quot;)
 if radGroup<>&quot;&quot; then
  response.write &quot;You selected to delete &quot; & radGroup
 else
  response.write &quot;You didn't select anything.&quot;
 end if
%>
<body>
</html>

Hope this helps,
Rob [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top