Is is Possible to Process 2 Different Scripts on a Form Submit?

Discussion in 'C#' started by studlee46, Jun 19, 2008.

  1. #1
    Essentially, we have an asp formmail script that we need processed and then the data sent over to a getresponse autoresponder.

    Anybody know if this possible?

    Thanks
     
    studlee46, Jun 19, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    You can't process 2 scripts with one form tag. <form action=onepage.asp> (it can only have 1 action). But you can use a simple response.redirect to forward the data to another page after the initial script processes the form.
     
    itcn, Jun 19, 2008 IP
  3. shaileshk

    shaileshk Well-Known Member

    Messages:
    455
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Yes can set action when page is submit. using javescript you can set dynamic action of the page.
    
    <form name=f1 action="" method=post onsubmit=chksubmit()>
    <input type=input name=text1>
    
    <input type=submit name=save>
    </form>
    function chksubmit()
    {
    
    if(document.f1.text1.value=='a')
    {
    document.f1.action="a.asp";
    }
    else
    {
    document.f1.action="b.asp";
    }
    document.f1.submit();
    }
    
    Code (markup):
     
    shaileshk, Jun 24, 2008 IP