ok, basically what I want to do is this:<form method="POST" action="https://www.google.com/asdf.cgi" action="http://www.asdf.com/blah.pl" > I have had trouble finding a proper method to do this so that it actually submits to both actions on submit. please help.
I'm not sure that would work; it'd only do one of them. What exactly is it that do you want to do?
I want to have one submit button perform multiple actions. Just like above, only that HTML wont work, and I'm not really good in java to where I can assign functions to perform the multiple actions.
I didn't have time to test this extensively, but this is what I came up with off the top of my head, and it worked when I tried to submit it to two different formmail scripts.
this looks great and all, but isnt it just submitting to one formmail? what i'm trying to do is have the form submit to two separate mailing lists. so when someone puts their email into the text box and clicks submit, they subscribe to my list and a neighbor sites list.
i would think it would involve having two functions in the onsubmit(); but i dont know how to write it. where function 1 would be the action= method= and function 2 would be the same. i think something like onsubmit('function1();','function2();'); just a hunch. this is what i need help with
No, it was submitting to formmail.php and formmail2.php, but there's a bug that I didn't see earlier. Internet Explorer keeps submitting to the second one twice. I'll try to look at it some more tomorrow.
I don't have time to write out the code, but the way I would probably hand this is by, instead of using a form submit button, I would use a regular button with an onClick that populates some global JS variables with your form data, then opens two small popups. Those popups contain a form with only hidden fields that get populated by an onLoad function from the opener variables and then submits with the last action being a window.close();
When the person clicks submit, these two windows popup then close (best to put window.blur() on both, or window.focus() on the form window). Then, use a while loop (careful to avoid infinite loops...) to watch those two windows, and once both are closed, location.href to a thank you page.
There is no way to do what you are talking about in pure HTML.
Many thanks for the tip. I needed to do exactly this as I wanted to have a submit button send an email using my ISP's standard email CGI script. I then needed all the same data to be sent to my credit card processing company.
I achieved it using your advice which was invaluable - thank you.