Accesing objects on form

S

Serge Myrand

Hi All,

How can I access the ID of the Submit button in the following example.
(This form POST to itself). I use these 2 submit buttons to navigate
from page to page in a recordset.

Response.Write "<FORM NAME=FrmPickProd METHOD=POST ACTION=PickProd.asp>"

Response.Write "<INPUT ID=0 TYPE=submit NAME=NextPage VALUE=" &
sPreceding & ">"
Response.Write "<INPUT ID=1 TYPE=submit NAME=NextPage VALUE=" &
sFollowing & ">"

thank you in advance
serge
 
E

Evertjan.

Serge Myrand wrote on 30 jun 2004 in
microsoft.public.inetserver.asp.general:
How can I access the ID of the Submit button in the following example.
(This form POST to itself). I use these 2 submit buttons to navigate
from page to page in a recordset.

Response.Write "<FORM NAME=FrmPickProd METHOD=POST ACTION=PickProd.asp>"

Response.Write "<INPUT ID=0 TYPE=submit NAME=NextPage VALUE=" &
sPreceding & ">"
Response.Write "<INPUT ID=1 TYPE=submit NAME=NextPage VALUE=" &
sFollowing & ">"

A clientside question.

OT on this Serverside ASP NG, even if you package it in Response.writes.
 
B

Bullschmidt

Assuming you have these submit buttons on a form:

<INPUT NAME="Preceding" TYPE="submit" VALUE="<%= sPreceding %>">
<INPUT NAME="Following" TYPE="submit" VALUE="<%= sFollowing %>">

And when receiving the post to see which of the above was the button
clicked on:

If Request.Form("Preceding") <> "" Then
...
Elseif If Request.Form("Following") <> "" Then
...
End If

Best regards,
J. Paul Schmidt, Freelance ASP Web Designer
http://www.Bullschmidt.com
ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top