help on having 2 different buttons on form?

Results 1 to 2 of 2

Thread: help on having 2 different buttons on form?

  1. #1
    Join Date
    Dec 1969

    Default help on having 2 different buttons on form?

    Hello. Can someone please tell me if my thoughts are correct on creating 2 buttons in as asp page? A user goes to this asp page to view all the info of this request. In that asp page, there will also be 2 voting buttons: Approve or Disapprove. <BR>If the user click "Approve", then it will pass the variable "Y" to a field in this table. If "Disapprove" is clicked, a "N" will be inserted. <BR>Now, I am unsure on how can I create 2 buttons inserting different values into the db. Do I have 2 Post form actions created for each button? Also, can you please suggest what is the best way to do this: if the user already voted, then should I (1)have no voting submit buttons appear at all OR (2)after the user vote, have a page appear that said he or she has already voted and it cannot be changed. Should it be done in javascript? Is there a sample you can reference me to that is similar? <BR>Thank you!

  2. #2
    Join Date
    Dec 1969

    Default RE: help on having 2 different buttons on form?

    &#039; See what btn used, where opened from, or where referred from.<BR>If Request.Form("btnYes") &#060;&#062; "" Then &#039; Yes btn.<BR> [Yes code goes here]<BR>Elseif Request.Form("btnNo") &#060;&#062; "" Then &#039; No btn.<BR> [No code goes here]<BR>Else &#039; Initially coming to page.<BR>End If<BR><BR>Best regards,<BR>J. Paul Schmidt - Freelance ASP Web Developer<BR> - To put live data on the Web...<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts