Hey all,
I'm having an issue. I'm trying to code a simple form so that people can enter in their email, phone, etc and when they click submit it will be sent to my email address. I got some code offline that I thought would work, but while the form and everything works, the submit button doesn't work so I don't get the information sent to me. Could someone help me and let me know what's wrong?
I substituted emailemail@hotmail.com for where my address i thought was supposed to go. Am i missing another place or did I just make a typing error?
I'm having an issue. I'm trying to code a simple form so that people can enter in their email, phone, etc and when they click submit it will be sent to my email address. I got some code offline that I thought would work, but while the form and everything works, the submit button doesn't work so I don't get the information sent to me. Could someone help me and let me know what's wrong?
I substituted emailemail@hotmail.com for where my address i thought was supposed to go. Am i missing another place or did I just make a typing error?
Code:
<TITLE></TITLE>
<script language="javascript">
function SendEmail(frm){
var emailAddress="emailemail@hotmail.com"
var message = "name:" + frm.txtName.value + "\n";
message = message +"phone:" + frm.txtold phone.value;
message = message +"email:" + frm.txtemail.value;
document.location.href = "mailto:"+emailemail@hotmail.com+"?subject=Test Mail&body="+escape(message);
}
</script>
<BODY>
<form name="frmSendEmail" >
<TABLE>
<TR>
<TD vAlign=center align=right width="35%">
name:
</TD>
<TD width="65%"><input type=text name=txtold value=""></TD></TR>
<TR>
<TD vAlign=center align=right width="35%">
phone:
</TD>
<TD width="65%"><input type=text name=txtpass value=""></TD></TR>
<TR>
<TD vAlign=center align=right width="35%">
email:
</TD>
<TD width="65%"><input type=text name=txtpass value=""></TD></TR>
<TR><TD vAlign=center align=center width="100%" colspan=3>
<INPUT TYPE="button" name="submit" Value="submit" onclick="SendEmail(this.form)">
</TD></TR>
</TABLE>
</form>
</BODY>