I've seen this addressed in other forums but the answers are always beyond me. Please explain as simply as possible. We're talking Baby Talk here.
Here's what I have on the form page which is cart.asp:
When any of the submit buttons are clicked, the form is posted to a processing page, process.asp, which ends with this:
As it stands, after receiving and processing the data, process.asp stalls and the screen goes white. What I want is to return to the anchor associated with the submit button that was clicked.
What I need to know is this:
1) how do I assign a unique value to each submit button in cart.asp?
2) how do I get the value associated with a given submit button passed when that submit is clicked?
3) and how do I reference that value in my conditional redirect in process.asp?
Any help appreciated. I've run out of hair to pull out.
~ Gary
Here's what I have on the form page which is cart.asp:
Code:
<td>
<a name="anchor1"></a>
<input type="hidden" name="whichSubmitButton" value="1" >
<input type="text" id="q1oz" name="q1oz" value="<% = q1oz %>" >
<input type="image" name="imageField" onClick="submit();" src="add2cart.gif">
</td>
<td>
<a name="anchor2"></a>
<input type="hidden" name="whichSubmitButton" value="2" >
<input type="text" id="q8oz" name="q8oz" value="<% = q8oz %>" >
<input type="image" name="imageField" onClick="submit();" src="add2cart.gif">
</td>
When any of the submit buttons are clicked, the form is posted to a processing page, process.asp, which ends with this:
Code:
If Request.Form("whichSubmitButton") = "1" Then
Response.Redirect "cart.asp#anchor1"
If Request.Form("whichSubmitButton") = "2" Then
Response.Redirect "cart.asp#anchor2"
Else
Response.Redirect "default.htm"
End If
As it stands, after receiving and processing the data, process.asp stalls and the screen goes white. What I want is to return to the anchor associated with the submit button that was clicked.
What I need to know is this:
1) how do I assign a unique value to each submit button in cart.asp?
2) how do I get the value associated with a given submit button passed when that submit is clicked?
3) and how do I reference that value in my conditional redirect in process.asp?
Any help appreciated. I've run out of hair to pull out.
~ Gary