Going to another page by pressing a button - 2 
Author Message
 Going to another page by pressing a button - 2

I have a similar question to Charles.

I need to have two Submit buttons on the same form.

Pressing the first button will allow the form data to be processed by
one ASP page and pressing the other will allow the data to be
processed by a different ASP page.

It would be great if someone could help me out here.

Pete.



Wed, 30 Jun 2004 01:52:14 GMT  
 Going to another page by pressing a button - 2
<script language=VBScript>
    function NewLocation(where)
        select case where
            case 1:
                sPage = "Page1.asp"
            case 2:
                sPage = "Page2.asp"
        end select
            myForm.action = sPage
            myForm.submit()
    end function
</script>
<body>
<form id=myForm name=myForm method=post>
    <input type=button onclick="NewLocation(1)" Value="First Page">
    <input type=button onclick="NewLocation(2)" Value="Second Page">
</form>
</body>

Regards, Paul Andrews


Quote:
> I have a similar question to Charles.

> I need to have two Submit buttons on the same form.

> Pressing the first button will allow the form data to be processed by
> one ASP page and pressing the other will allow the data to be
> processed by a different ASP page.

> It would be great if someone could help me out here.

> Pete.



Sun, 04 Jul 2004 18:42:36 GMT  
 Going to another page by pressing a button - 2
Many thanks Paul.

Your suggestion is EXACTLY what I wanted.

I appreciate your help.

Pete

On Wed, 16 Jan 2002 10:42:36 -0000, "Paul Andrews"

Quote:

><script language=vbscript>
>    function NewLocation(where)
>        select case where
>            case 1:
>                sPage = "Page1.asp"
>            case 2:
>                sPage = "Page2.asp"
>        end select
>            myForm.action = sPage
>            myForm.submit()
>    end function
></script>
><body>
><form id=myForm name=myForm method=post>
>    <input type=button onclick="NewLocation(1)" Value="First Page">
>    <input type=button onclick="NewLocation(2)" Value="Second Page">
></form>
></body>

>Regards, Paul Andrews



>> I have a similar question to Charles.

>> I need to have two Submit buttons on the same form.

>> Pressing the first button will allow the form data to be processed by
>> one ASP page and pressing the other will allow the data to be
>> processed by a different ASP page.

>> It would be great if someone could help me out here.

>> Pete.



Tue, 06 Jul 2004 10:57:59 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Multiple Row Selection using DBGrid

2. Aliases

3. Going to another page by pressing a button

4. going back one page by clicking on a button in your browser

5. Buttons going to a new page

6. analog meters components

7. using date field in a query

8. Press Enter key to go to next field

9. the numberlock goes off while press return key

10. procedure entry point QT_Thunk could not be located in kernel32.dll ???

11. Update/Patch? 7.0 to 7.01

12. Free Pascal Compiler 1.0beta1 - 0.99.8 released

 

 
Powered by phpBB® Forum Software