Use multiple submit buttons on one formTag(s): Form


<SCRIPT>
function submitFunction(i) {
   if (i==1) document.theForm.action=
      "http://www.company.com/cgi-bin/cgi1.cgi";
   if (i==2) document.theForm.action=
      "http://www.company.com/cgi-bin/cgi2.cgi";
   if (i==3) document.theForm.action=
      "http://www.company.com/cgi-bin/cgi3.cgi";
   document.theForm.submit()
   }
</SCRIPT>

<FORM NAME="theForm">
<INPUT TYPE="button" VALUE="Submit 1" onClick="submitFunction(1)">
<INPUT TYPE="button" VALUE="Submit 2" onClick="submitFunction(2)">
<INPUT TYPE="button" VALUE="Submit 3" onClick="submitFunction(3)">
</FORM>

blog comments powered by Disqus