How to create email form? plz help desperately
hello guys,
am new to scripting but know the designing part very well. I am stuck with an enquiry form which has to be emailed by users online. I am unable to receive any mails in my mailbox. Am I doing something wrong. PLzzz help me in this.
i am going to send the attachements
am using frames (though I am unhappy with it)
plzzz help me with this. I am truely stuck and have high hope with the people in this forum.
thnx
Wait ignore previous post
The way you have it set up, it is best for you to use javascript. I'll write the code, test it, email it to you and tell you how to set it up.
Tell me where you put your code together on (whether it waas notepad or html editor(plz specify))
how to use the server side
well how to use the server side? have u seen the zip files that i sent? now how to make that enquiry.htm work??? i used simple javasript
<FORM name=mobicon onsubmit="return validateForm();" action="mailto:sales@mobiconcommodities.com?sub=from website" target="centerframe" method=post>
but it alerts the user that his/her email wud be passed on and all and starts with the wizard.
First one which i used was:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
color: #93A81C;
}
-->
</style>
</head>
<body>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="227" align="left" valign="top" bgcolor="#EAEAEA"><table width="227" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/trans_bar.gif" width="1" height="30"></td>
</tr>
</table></td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td width="227" rowspan="2" align="left" valign="top" bgcolor="#EAEAEA"><table width="201" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="9" rowspan="4"><img src="images/trans_bar.gif" width="9" height="1"></td>
<td width="9" height="47" align="right" valign="top"><img src="images/greyborder_toplft.gif" width="9" height="47"></td>
<td width="217" height="47" align="left" valign="top" background="images/bkggreyprod.gif"><img src="images/our-prod_caption.gif" width="193" height="47"></td>
<td width="9" height="47" align="left" valign="top"><img src="images/greyborder_toprht.gif" width="9" height="47"></td>
</tr>
<tr>
<td width="9" rowspan="2" background="images/greyborder_lft.gif"> </td>
<td width="217" height="178" align="center" valign="top" bgcolor="#FFFFFF"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="185" height="147">
<param name="movie" value="images/left_pics.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
<embed src="images/left_pics.swf" width="185" height="147" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" wmode="transparent"></embed>
</object></td>
<td width="9" rowspan="2" background="images/greyborder_rht.gif"> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="217"><p><img src="images/anyenquiry_txt.gif" width="193" height="37"></p>
<div align="left" style="margin-left:15px; margin-right:px">
<p class="style1"><a href="mailto:sales@mobiconcommodities.com" target="_blank" class="link_text">sales@mobiconcommodities.com</a></p>
<div align="left" style="margin-down:15px; margin-right:px"> </div>
</div></td>
</tr>
<tr>
<td width="9" height="9" align="left" valign="top"><img src="images/greyborder_btomlft.gif" width="9" height="9"></td>
<td height="9" background="images/greyborder_btom.gif" width="217"><img src="images/trans_bar.gif" width="1" height="9"></td>
<td width="9" height="9" align="right" valign="top"><img src="images/greyborder_btomrht.gif" width="9" height="9"></td>
</tr>
</table></td>
<td width="5" rowspan="2" align="left" valign="top" bgcolor="#FFFFFF"><img src="images/trans_bar.gif" width="5" height="1"></td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF"><table width="530" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10" rowspan="4"></td>
<td height="16" align="right" valign="top"><img src="images/enquiry_txt.gif" width="80" height="16" align="top"></td>
<td width="10" rowspan="4"><img src="images/trans_bar.gif" width="10" height="1"></td>
</tr>
<tr>
<td width="1" valign="top" bgcolor="#5C97D1"><img src="images/trans_bar.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="7" align="left" valign="top"><img src="images/blue_dot.gif" width="5" height="7"></td>
</tr>
<tr>
<td valign="top"><div align="justify">
<p class="m_text"><br>
As a specialist trading company we offer Sugar, Urea and Containerise HMS 1 & 2. These commodities are sourced directly from manufacturers and mandates and can be supplied at any quantity and to any location.</p>
<p class="m_text">Please email us with your requirements mentioning the following details:</p>
<table width="100%" border="0" cellspacing="2" cellpadding="5">
<tr>
<td valign="top">
<SCRIPT>
String.prototype.trim = function()
{
// skip leading and trailing whitespace
// and return everything in between
return this.replace(/(^\s *)|(\s*$)/g,"")
}
function validateEmail(obj)
{
//Validates email
var tempEmail = obj.value.trim();
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(tempEmail))
{
return true;
}
else
{
alert("Incorrect email address");
obj.focus();
return false;
}
}
function validateForm()
{
//Email validation
if(document.mobicon.txtEmail.value.trim() == '')
{
alert("Email Id is required");
document.mobicon.txtEmail.focus();
return false;
}
if(!validateEmail(document.mobicon.txtEmail))
{
return false;
}
//Name validation
if(document.mobicon.txtName.value.trim() == '')
{
alert("Name is required");
document.mobicon.txtName.focus();
return false;
}
return true;
}
</SCRIPT>
<FORM name="mobicon" onsubmit="return validateForm();" action="co.php" target="centerframe" method="post">
<p> <span class="m2_text">YourName*: </span>
<input name="txtName" type="text" id="txtName" size="30" maxlength="100">
</p>
<p> <span class="m2_text">Organisation:</span>
<input name="txtOrg" type="text" id="txtOrg" size="30" maxlength="100">
</p>
<p><span class="m2_text">Address:</span>
<input name="textAdd" type="text" id="textAdd" value="" size="30">
</p>
<p><span class="m2_text">email ID*:</span>
<input name="txtEmail" type="text" id="txtEmail" size="30" maxlength="100">
</p>
<p><span class="m2_text">Commodities:</span>
<textarea name="textcommodities" cols="22" rows="4" id="textcommodities"></textarea>
</p>
<p><span class="m2_text">Quantity: </span>
<input name="texquantity" type="text" id="texquantity" size="30" maxlength="150">
</p>
<p><span class="m2_text">Destination:</span>
<input name="textdestination" type="text" id="textdestination" size="30" maxlength="100">
</p>
<p><span class="m2_text">Timeframe:</span>
<input name="texttimeframe" type="text" id="texttimeframe" size="30" maxlength="100">
</p>
<p><span class="m2_text">Payment Methood:
<input name="textpayment" type="text" id="textpayment" size="30" maxlength="100">
<br>
(DLC / SBLC / BG / <br>
TT/ DAP) </span> </p>
<p><span class="m2_text">Comments: </span>
<textarea name="txtcomments" cols="23" rows="4" id="txtcomments"></textarea>
</p>
<p> & nbsp;
<INPUT name="email" type=submit id="email" value="E-mail">
</p>
</form></td>
</tr>
</table>
<p></p>
</div></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
scrollbar is no worry for me
Quote:
Originally Posted by
chechu
I cannot find your site back. Please place a link.
Hi chechu,
scrollbar is not the worrying issue for me.I am only stuck up with the enquiry form using asp. I have again posted my query in HTML heading.. submission form with the entire code.
I am just hoping to find someone to help me in this... thats it...