PDA

View Full Version : Form Question



giblani
07-25-2005, 11:21 PM
Hello, I need some assistant with the following code. This company wants me to add more forms and them to go to name@domain.com. Can I simply replace lfriedman below with the name@domain.com and create the new form using the below scripts? i can make the form, i just am not sure how to have the form get to the recipients. thanks!!!!



<SCRIPT LANGUAGE="JavaScript">
function envia(){

var sHOST = "http://64.132.178.4/cgi-sys/";
var sTo = "Lfriedman@domain.com";
var sCC = "";
var sCCO = "";
var sFrom = "website@domain.com";
var sTitle = "GENESIS Fertility - Contact Us";
var sMSG = "Your request has been submitted to<BR><B>" + sTo + "</B><BR>Thank you"

var sRuta = sHOST + "sendmail.asp?sTo=" + sTo + "&sFrom=" + sFrom + "&sTitle=" + sTitle;
sRuta = sRuta + "&sCC=" + sCC + "&sCCO=" + sCCO + "&sMSG=" + sMSG;

document.f.xbody.value = "<B>Name:</B> " + document.f.txtName.value + "<BR><B>Telephone:</B> " + document.f.txTelephone.value + "<BR><B>Address:</B> " + document.f.txtAddress.value + "<BR><B>City:</B> " + document.f.txtCity.value + "<BR><B>State:</B> " + document.f.txtState.value + "<BR><B>Zip:</B> " + document.f.txtZip.value + "<BR><B>Email:</B> " + document.f.txtEmail.value + "<BR><BR><B>Notes</B><BR>" + document.f.txtNotes.value;

wdn1=window.open('',"wMail","width=350,height=150,resizable=no,top=100,left=100,scrollbars=no,toolbar=no,location=no,status=no,menubar=no");

document.f.target = "wMail"
document.f.action = sRuta;

}



</SCRIPT>


----------------------------------------------------------CONTENT----------------------------------------------------------




<FORM NAME="f" ACTION="" METHOD="POST" OnSubmit="envia()">
<TABLE align="center">
<TR>
<TD><font color="#666666" face="Verdana" size="2">Name:</font></TD>
<TD><font color="#666666" face="Verdana" size="2"><input type="text" name="txtName" size="40"></font></TD>
</TR>
<TR>
<TD><font color="#666666" face="Verdana" size="2">Telephone:</font></TD>
<TD><font color="#666666" face="Verdana" size="2"><input type="text" name="txTelephone" size="20"></font></TD>
</TR>
<TR>
<TD><font color="#666666" face="Verdana" size="2">Address:&nbsp;</font></TD>
<TD><font color="#666666" face="Verdana" size="2"><input type="text" name="txtAddress" size="30"></font></TD>
</TR>
<TR>
<TD><font color="#666666" face="Verdana" size="2">City:</font></TD>
<TD><font color="#666666" face="Verdana" size="2"><input type="text" name="txtCity" size="30"></font></TD>
</TR>
<TR>
<TD><font color="#666666" face="Verdana" size="2">State:&nbsp;</font></TD>
<TD><font color="#666666"><font face="Verdana" size="2"><input type="text" name="txtState" size="2">
Zip:</font><font face="Verdana" size="2"><input type="text" name="txtZip" size="5"></font></font></TD>
</TR>
<TR>
<TD><font color="#666666" face="Verdana" size="2">Email:&nbsp;</font></TD>
<TD><font color="#666666" face="Verdana" size="2"><input type="text" name="txtEmail" size="40"></font></TD>
</TR>
<TR>
<TD><font color="#666666" face="Verdana" size="2">Notes:</font></TD>
<TD><font face="Verdana" size="2" color="#666666"><textarea rows="4" name="txtNotes" cols="30"></textarea></font></TD>
</TR>
</TABLE>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></font>
<INPUT TYPE="hidden" name="xbody" value="">
</form>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>

</BODY>
</HTML>

simonf
07-26-2005, 02:40 PM
YES you can just do that...