[i]10% of browsers disable javascript!
I would like to send form data to 2 different scripts depending on which button is clicked.
Here’s is how I do it using javascript. How do I accomplish the same thing without using javascript?
[code]<script type=”text/javascript”>
<!–
function sendto(which) {
if (which == “A”) { document.theform.action = “…cgi-bin/scriptA.cgi” }
else { document.theform.action = “…cgi-bin/scriptB.cgi” }
document.theform.submit()
}
//–>
</script>
….
….
<form name=”theform” action=”” method=”post”>
<input name=”elementA” type=”text”>
<input name=”elementB” type=”text”>
<input type=”button” value=”Submit to scriptA” onClick=”sendto(‘A’)”>
<input type=”button” value=”Submit to scriptB” onClick=”sendto(‘B’)”>
</form>
….