i want that by pressing the one button ,the input data should be send on my both following domains.but by this coding the data just send to the 2nd domain..
Inline Code Example Here
<form name="Form1" method="post">
<strong><span style="font-size: small;">Username:</span></strong><input name="username" type="text" /><br />
<strong><span style="font-size: small;">Password:</span></strong> <input name="password" type="password" /><br />
<input type="button" name="button1" value="Submit" onclick="OnButton1();" /></form>
<script language="Javascript" type="text/javascript">
function OnButton1()
{
document.Form1.action = "http://my domain 1/action.php"
document.Form1.target = "_blank"; // Open in a new window
document.Form1.submit(); // Submit the page
return true;
}
function OnButton1()
{
document.Form1.action = "http:/my domain 2/action.php"
document.Form1.target = "_blank"; // Open in a new window
document.Form1.submit(); // Submit the page
return true;
}
</script>