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

Here's a slowball for you. I have a

Status
Not open for further replies.

GaryCam

Programmer
Dec 16, 2003
69
US
Here's a slowball for you. I have a form which has two buttons which serve to submit the form:

<FORM name=&quot;frmModify&quot; action=&quot;register.asp&quot; method=&quot;post&quot; id=&quot;frmModify&quot;>
<INPUT type=&quot;image&quot; name=&quot;imageField&quot; src=&quot;one.gif&quot; onClick=&quot;submit();&quot;>
<INPUT type=&quot;image&quot; name=&quot;update&quot; src=&quot;two.gif&quot; onClick=&quot;submit();&quot;>
</FORM>

At the end of register.asp, I have a Response.Redirect back to this form. My question is this: What's the best way to get register.asp to return to the button that called it instead of just going to the top of the form? Somehow I'll have to let register.asp know which button called it.

Thanks for your help.
~ Gary
 
I you can use the name property in the input field. So, if you have these buttons (note: I added the value property):

<INPUT type=&quot;image&quot; name=&quot;imageField&quot; value=&quot;something&quot; src=&quot;one.gif&quot; onClick=&quot;submit();&quot;>
<INPUT type=&quot;image&quot; name=&quot;update&quot; value=&quot;something&quot; src=&quot;two.gif&quot; onClick=&quot;submit();&quot;>

On register.asp, you can do:
if request.form(&quot;imageField&quot;) <> &quot;&quot; then
' do whatever - the imageField button was selected
elseif request.form(&quot;update&quot;) <> &quot;&quot; then
' do whatever - the update button was selected
end if

Try that.

-Phil
fillup07@hotmail.com
If my post was helpful, please give me a star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top