Submit form to Multiple pages with one submit button

Discussion in 'JavaScript' started by greatlogix, May 24, 2011.

  1. #1
    I want to submit a single 'form' to 5 different pages. for 3 submissions i need to submit and open popup window. for 2 submissions i need to generate csv files from two different files (i have php code ready for csv. I just need to submit form data to both files ) . how i can do this?
     
    greatlogix, May 24, 2011 IP
  2. abacies

    abacies Active Member

    Messages:
    103
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    66
    #2
    Can you able to use Jquery Tabs? So instead of using pages tabs.so single page,n number of tabs, one submit.
     
    abacies, May 24, 2011 IP
  3. greatlogix

    greatlogix Active Member

    Messages:
    664
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    85
    #3
    no. I just want to submit one form to 5 different pages. no need for tabs here.
     
    greatlogix, May 25, 2011 IP
  4. Jan Novak

    Jan Novak Peon

    Messages:
    121
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    0
    #4
    save this as html page and try it... This simulate GET method.

    
    <form onsubmit="return foo()"> 
      <input id="param1" type="text" value="xxx">
      <input type="submit" value="submit">  
    </form>
    
    <script>
    function foo(){
       var paramVal=document.getElementById("param1").value
        window.open("http://www.google.com?param1="+paramVal)
        window.open("http://www.yahoo.com?param2="+paramVal)
        return false
    }
    </script>
    
    Code (markup):
     
    Jan Novak, May 26, 2011 IP