Multiple form submit buttons

Results 1 to 3 of 3

Thread: Multiple form submit buttons

  1. #1
    JDM Guest

    Default Multiple form submit buttons

    My dilemma: I want specific sections of my ASP script to be run based on the form submit button passed to the script. I will be using two submit buttons. The script will first write a cookie, then redirect the user based on the submit button pressed.<BR><BR>I cannot seem to get this to work. My submit buttons look like this:<BR><BR>&#060;input TYPE="submit" VALUE="Save - Get Line 2" name="GetLine"&#062;<BR><BR>&#060;input TYPE="submit" VALUE="Save and Exit" name="GetOptions"&#062;<BR><BR>The "form action" tag runs my ASP script.<BR><BR>I don&#039t know how to assign values to the "passed" button so the ASP script will recognize which one has been pressed and then redirect properly. Should I be using buttons and on_click events instead? Any ideas?<BR><BR>Thanks,<BR><BR>JDM

  2. #2
    JDM Guest

    Default Problem solved

    Solved my problem. Must have experienced a brain pause...<BR><BR>Just used a conditional to handle the string passed from one of the submit buttons. If string is empty, "do this," if it&#039s not<BR>empty, "do that."<BR><BR>JDM

  3. #3
    Join Date
    Dec 1969

    Default RE: Multiple form submit buttons

    Try giving them the same name and then querying that name in the form processor...?

Posting Permissions

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