Two submit buttons

Results 1 to 4 of 4

Thread: Two submit buttons

  1. #1
    Bob B Guest

    Default Two submit buttons

    i have two submit buttons for a form page. Now i need both buttons to insert into the database but i want them to redirect to different pages. One submit button is a insert and complete button and the other submit button is an insert and go on and insert again button.<BR><BR>I&#039;ve tried various ways with if and then else and case statements. Does anyone have any idea on how i could work this out.

  2. #2
    Join Date
    Dec 1969

    Default Select case request("buttonname")

    select case request("buttonname")<BR>case "insertandfinish":<BR> &#039;Insert record and forward to another page<BR>case "insertandinsertagain":<BR> &#039;insert record and forward to page where the<BR> &#039;user can insert another record<BR>end select<BR><BR>-- Whol

  3. #3
    Gil Guest

    Default RE: Two submit buttons

    Build a javascript function for every button !

  4. #4
    Do a client side script Guest

    Default RE: Two submit buttons

    So, have your form where you don&#039;t set and action, and keep your submit buttons seperate, then have a seperate function for each button<BR><BR>&#060;input type="button" onclick="post()" value="update"&#062;<BR>&#060;input type="button" onclick="continue" value="continue"&#062;<BR>&#060;Script&#062;<BR>fu nction post() {<BR>document.form1.action = "whateverpage.asp";<BR>document.form1.submit();<BR >return true;<BR>}<BR>function continue() {<BR>document.form1.action = "whateverotherpage.asp";<BR>document.form1.submit( );<BR>return true;<BR>}<BR>&#060;/script&#062;<BR><BR>HTH<BR>dave

Posting Permissions

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