Hello, Folks!!
I am not very experience. I would really appreciate some help as follows:
Goal: Run 2 actions associated with 1 submit, just have to add URLs and they will pull out all the necessary info they need from the form.
Constraints: No access to Database, No Ajax and No PHP.
Problem: Nothing happens even when I use <input type="button" value="submit" onclick="OnBtn1(); OnBtn2();">
I also tried these with no luck:
HTML Code:
<script type="text/javascript">
function postToUrl () {
document.Form1.action = "https://dB2.com/cgi-bin/b.cgi?"
document.Form1.submit();
}
</script>
<form id=" Form1" method="POST" action="https://dB1.com/cgi-bin/a.cgi?" onsubmit="postToUrl();">
<input type="text" id="field1" name="field1">
<input type="text" id="field2" name="field2">
<input type="button" value="submit" name="sdb">
</form>
Can someone please help me? Thank you!