kaos
08-21-2009, 05:59 PM
Hello,
Could someone help me? I'm trying to make a simple feedback form that will send me it's contents in an email. However, if I use the mailto:(email here) command, it opens up Microsoft Outlook. I jest want it to send me the data. Can someone help me? Here's my code:
<form name="feedback" action="feedback-thank-you.html" onsubmit='return verifyMe();' method="post">
<table border=0 width=100%>
<tr>
<td width=10% align=left><font size=4><b>Name:</b></td><td><input type="text" name="name" id="name" maxlength="20" value=""></td>
</tr>
<tr>
<td width=10% align=left><font size=4><b>Email:</b></td><td><input type="text" name="email" id="email" maxlength="20" value=""></td>
</tr>
<tr>
<td width=10% align=left>
<font size=4><b>Subject:</b></td><td><select name="subject" id="subject">
<option value="ns">--Select A Subject--</option>
<option value="fb">Give me Feedback</option>
<option value="rp">Report a Problem</option>
<option value="gh">Get Help</option>
<option value="jc">Just Chat</option>
</select></td><td width=10%></td>
</tr>
<tr>
<td width=10% valign="top"><font size=4><b>Message:</b></td><td width=50%><textarea cols=30 rows=10 name="body" id="body"></textarea></td>
</tr>
</table>
<center><input type="submit" value="Send!"></center>
</form>
I also use this script (right before the form):
<script language='javascript'>
function verifyMe(){
var msg='';
if(document.getElementById('name').value==''){
msg+='- Name\n\n';}
var email=document.getElementById('email').value;
if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))){
msg+='- Invalid Email Address: '+email+'\n\n';}
if(document.getElementById('email').value==''){
msg+='- Email\n\n';}
if(document.getElementById('subject').value=='ns'){
msg+='- Subject\n\n';}
if(document.getElementById('body').value==''){
msg+='- Message\n\n';}
if(msg!=''){
alert('The following fields are empty or invalid:\n\n'+msg);
return false
}else{
return true }
}
</script>
Could someone help me? I'm trying to make a simple feedback form that will send me it's contents in an email. However, if I use the mailto:(email here) command, it opens up Microsoft Outlook. I jest want it to send me the data. Can someone help me? Here's my code:
<form name="feedback" action="feedback-thank-you.html" onsubmit='return verifyMe();' method="post">
<table border=0 width=100%>
<tr>
<td width=10% align=left><font size=4><b>Name:</b></td><td><input type="text" name="name" id="name" maxlength="20" value=""></td>
</tr>
<tr>
<td width=10% align=left><font size=4><b>Email:</b></td><td><input type="text" name="email" id="email" maxlength="20" value=""></td>
</tr>
<tr>
<td width=10% align=left>
<font size=4><b>Subject:</b></td><td><select name="subject" id="subject">
<option value="ns">--Select A Subject--</option>
<option value="fb">Give me Feedback</option>
<option value="rp">Report a Problem</option>
<option value="gh">Get Help</option>
<option value="jc">Just Chat</option>
</select></td><td width=10%></td>
</tr>
<tr>
<td width=10% valign="top"><font size=4><b>Message:</b></td><td width=50%><textarea cols=30 rows=10 name="body" id="body"></textarea></td>
</tr>
</table>
<center><input type="submit" value="Send!"></center>
</form>
I also use this script (right before the form):
<script language='javascript'>
function verifyMe(){
var msg='';
if(document.getElementById('name').value==''){
msg+='- Name\n\n';}
var email=document.getElementById('email').value;
if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email))){
msg+='- Invalid Email Address: '+email+'\n\n';}
if(document.getElementById('email').value==''){
msg+='- Email\n\n';}
if(document.getElementById('subject').value=='ns'){
msg+='- Subject\n\n';}
if(document.getElementById('body').value==''){
msg+='- Message\n\n';}
if(msg!=''){
alert('The following fields are empty or invalid:\n\n'+msg);
return false
}else{
return true }
}
</script>