#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2001
    Location
    England
    Posts
    673
    Rep Power
    15

    Can you have 2 submit buttons for the same form that go to 2 different pages?


    Hello,

    I want to have 2 submit buttons for the same form. If you press one button, you go to one page with a script on it- if you press the other button you go to the other page with a different script on it. Is this possible?

    Many thanks

    James
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Pittsburgh, PA
    Posts
    54
    Rep Power
    14
    You could possibly put in some code to change the ACTION property of your form:

    Code:
    <FORM ACTION="">
    ...
    <INPUT TYPE="BUTTON" VALUE="page1"
    OnClick="this.form.action='page1.htm';this.form.submit();">
    <INPUT TYPE="BUTTON" VALUE="page2" 
    OnClick="this.form.action='page2.htm';this.form.submit();">
    </FORM>

IMN logo majestic logo threadwatch logo seochat tools logo