hi everyone!
is it possible to have a three forms in one page with only one submit button? we have a web paging system, my boss wants me to make a modification on the paging system, by default, the message will be sent to a pager.
and there's three check boxes below the form that will instruct users to choose from, if they tick the CHECKBOX1, the message will be submitted to the pager, and if they tick the CHECKBOX2, the message will be submitted to email, and if they tick CHECKBOX3, the message will be submitted to mobile, and if they tick all the CHECKBOXES, the message will be sent to pager, email and mobile.
we already had the module for the pager, email and mobile. am havin problem only on how to organize the submission base on the selection on the check box.
below is my form:
<HTML>
<HEAD>
<TITLE>
Page-A-User Web Page
</TITLE>
</HEAD>
<BODY>
<H2><CENTER><font size="2">Fill in This Form to Send a Page</font></CENTER></H2>
<FORM ACTION ="scripts/webgate.exe" METHOD=POST>
<FORM ACTION ="scripts/send_email.php" METHOD=POST>
<FORM ACTION ="scripts/mobile.exe" METHOD=POST>
<CENTER>
<font size="2">PAGER RECIPIENT </font><font size="1">
<INPUT SIZE=20 MAXLENGTH=40 NAME="USER" id="USER">
</font>
<span id=T1S style="visibility:hidden;" >
<font size="2">EMAIL RECIPIENT </font>
<input type="text" name="T1" size="20">
</span>
<span id=T2S style="visibility:hidden;" >
<font size="1">MOBILE RECIPIENT </font>
<input type="text" name="T2" size="20"></font>
</span>
</CENTER>
<font size="2">
<BR>
</font>
<CENTER><font size="2">FROM </font><font size="1"> <INPUT SIZE=40 MAXLENGTH=80 NAME="FRM"></font><font size="2"></TEXTAREA></font></CENTER>
<font size="2">
<BR>
</font>
<CENTER><font size="2">MESSAGE</font></CENTER>
<CENTER><font size="1"><TEXTAREA COLS=60 ROWS=5 WRAP=VIRTUAL NAME="MSG"></TEXTAREA></font>
<p id="CheckBoxes" onclick="CheckBoxesCk(this);">
<font size="1">
<input type="checkbox" name="C3" value="ON" checked></font>
<font size="2">Send to Pager </font><font size="1">
<input type="checkbox" name="C1" value="ON">
<font size="2">Send to E-Mail </font>
<input type="checkbox" name="C2" value="ON">
<font size="2">Send to Mobile </font>
<input type="checkbox" name="C4" value="ON">
<font size="2">Check All</font></font>
</p>
</CENTER>
<BR><BR>
<CENTER><INPUT TYPE=SUBMIT NAME = "SEND" VALUE = "SEND PAGE"><INPUT TYPE=RESET VALUE = "CLEAR FORM"></CENTER>
</FORM>
<script language="JavaScript" type="text/javascript">
<!--
function CheckBoxesCk(obj){
send='Pager';
document.getElementById('T1S').style.visibility='hidden';
document.getElementById('T2S').visibility='hidden';
cbs=obj.getElementsByTagName('INPUT');
if (cbs[3].checked){
for (i=0;i<cbs.length;i++){
cbs[i].checked='checked';
}
}
if (cbs[0].checked){
}
if (cbs[1].checked){
document.getElementById('T1S').style.visibility='visible';
send+='E-mail';
}
if (cbs[2].checked){
document.getElementById('T2S').style.visibility='visible';
send+='Mobile';
}
alert(send);
// match send for 'E-mail' and 'Mobile' to decide where to send the message
}
//-->
</script>
</HTML>
any help would be highly appreciated. thanks a lot in advance!