Professional Contact Form
Professional Contact Form a custom form to mail script to use in any web site. Your clients can send their messages to you filling only a simple form. Script supports Persist AspEmail, CDONTS, W3 JMail 4.1. Now first let's create our form :
<p><font face="Tahoma" size="2"><b>Professional Contact Form</b></font></p>
<form method="POST" action="contact_form.asp">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font face="Tahoma" size="2" color="#000000"><b>Name :</b></font></td>
<td><input type="text" name="name" size="30" value="<%=strName%>" maxlength="100"></td>
</tr>
<tr>
<td><font face="Tahoma" size="2" color="#000000"><b>Email :</b></font></td>
<td><input type="text" name="email" size="35" maxlength="140" value="<%=strEmail%>"></td>
</tr>
<tr>
<td><font face="Tahoma" size="2" color="#000000"><b>Subject :</b></font></td>
<td><input type="text" name="subject" size="45" maxlength="120" value="<%=strSubj%>"></td>
</tr>
<tr>
<td><font face="Tahoma" size="2" color="#000000"><b>Message : </b></font></td>
<td><TEXTAREA onkeydown=javascript:textCounter(this.form.message,this.form.remLen,450);
onkeyup=javascript:textCounter(this.form.message,this.form.remLen,450);
style="FONT-SIZE: 12px; FONT-FAMILY: verdana" name=message rows=8 wrap=virtual cols=60
onchange=javascript:textCounter(this.form.message,this.form.remLen,450);><%=strMsg%></TEXTAREA>
<INPUT type=hidden name=remLen>
<font size="2" face="verdana">Character Count <B>�</B>
<SPAN id=Label></SPAN></font>
</td>
</tr>
</table>
<p><input type="submit" value="Send Now" name="func"><input type="reset" value="Reset" name="B2"></p>
</form>
Message field counts the characters so no one can send long messages. Unless this function someone can easily send long messages and this will break your internet traffic. Add those lines top of your web page beetween 'head' tags :
<SCRIPT language=JavaScript>
<!--
function add_window_open(url, target, parms)
{
document.addArticle.submit();
myAddWindow = window.open(url, target, parms);
}
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) {
// if too long...trim it!
temp1=field.value;
field.value="";
field.value = temp1.substring(0, maxlimit);
alert("Maximum number of input characters is " + maxlimit );
}
// otherwise, update 'characters left' counter
else countfield.value = maxlimit - field.value.length;
Label.innerText=field.value.length;
}
function initialCount(val)
{
Label.innerText=val;
document.forms.addArticle.charactercount.value=val;
}
//-->
</SCRIPT>
- ASP Chat Box
- Working with Array Remove An Item
- ASPNET Web Counter Free Open Source Code
- Beginning-Ajax-and-ASPNET-35
- How to upload images to mySQL within PHP
- Delete Files Online in ASP
- Video Interview With Roman Strobl
- Custom Paging in ASP Fast And Easy
- Displaying Records From An Excel Database
- Paging Results in PHP
- How to write and use a JavaBean My frst java bean
- Installing Sun Java System Application Server 9.1 in Solaris Zones
- Java SE 6 Performance White Paper
- Converting sceonds to hours minutes and seconds
- What is Ecommerce and the Importance of Ecommerce
- Easy Download Manager Free Version
- ASP Chat Box
- Writing Form Data to Text Files
- Paging Records in JSP
- What is Ecommerce and the Importance of Ecommerce
- Beginning-Ajax-and-ASPNET-35
- How to upload images to mySQL within PHP
- Simple XML RSS Parser
- Counting records in PHP mySQL
- ActiveNews Manager Freeware News Exchange Software
- How to write and use a JavaBean My frst java bean
- Paging Results in PHP
- Free User Registration Form
- A-timesaver-control-GridView
- ASPNET Web Counter Free Open Source Code
- Easy Download Manager Free Version
- ASP Chat Box
- Writing Form Data to Text Files
- Paging Records in JSP
- Beginning-Ajax-and-ASPNET-35
- How to upload images to mySQL within PHP
- Simple XML RSS Parser
- ActiveNews Manager Freeware News Exchange Software
- Counting records in PHP mySQL
- How to write and use a JavaBean My frst java bean
- Paging Results in PHP
- Free User Registration Form
- A-timesaver-control-GridView
- ASPNET Web Counter Free Open Source Code
- Comparing Dates