Advertisement
Guest User

How to post to different form

a guest
May 20th, 2013
19,551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.61 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>SO Example</title>
  5. </head>
  6. <body>
  7. <form id="someForm" action="" method="POST">
  8. <!--Put your inputs here -->
  9. <input type="button" value="Save" name="save" onclick="askForSave()" />
  10. <input type="button" value="Finished" name="finished" onclick="askForSubmit()" />
  11. </form>
  12. <script>
  13. form=document.getElementById("someForm");
  14. function askForSave() {
  15.     form.action="save_for_later.php";
  16.     form.action="http://box.sianware.com/echopost.php";
  17.     form.submit();
  18. }
  19. function askForSubmit() {
  20.     form.action="submit_for_approval.php";
  21.     form.submit();
  22. }
  23.  
  24. </script>
  25. </body>
  26. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement