<!-- CONTACT FORM --> <!-- This goes into the HEAD of the html file --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2003, Sandeep Gangadharan --> <!-- For more free scripts go to http://sivamdesign.com/scripts/ --> <!-- function checkForm() { document.form.Email.value = " " + document.form.Email.value; if (document.form.Name.value == "") { // this part of the script is alert('The Name field is empty!'); return false; } // related to the Name field if (document.form.Company.value == "") { // this part of the script is alert('The Company field is empty!'); return false; } // related to the Company field if (document.form.Rate.selectedIndex == " ") { // this part of the script is alert('You have not rated my Site!'); return false; } // related to the Rate field mail = document.form.Email.value; // this part of the script is if ((mail.indexOf('@') == -1) || (mail.indexOf('.') == -1)) { alert('The E-mail address is invalid!'); return false; } // related to the E-Mail field if (document.form.Query.value == "") { // this part of the script is alert('The Comments / Query field is empty!'); return false; } if (document.form.Query.value.length > 250) { alert('The Comments / Query is too long!'); return false; } // related to the Comments field // the code prevents users from typing in more than 250 characters in the comment // field. The # can be modified by typing in any number instead of 250. If this // feature is not needed just delete the 2 lines in the code above. document.form.AppName.value = navigator.appName; document.form.AppVersion.value = navigator.appVersion; document.form.Resolution.value = window.screen.width + " X " + window.screen.height; window.setTimeout("history.back(-1)",2000); return true; } // --> </script> </head> <body bgcolor="#ffffff"> <!-- This goes in the BODY the html file --> <table border="0" cellpadding="0" cellspacing="0" align="center" width="460"> <tr> <td bgcolor="#808080" align="center" colspan="2"> <font face="verdana, arial, helvetica, sans-serif" size="2" color="#ffffff"> <b>Contact Form</b> </font> </td> </tr> <tr> <td colspan="2"> &nbsp; </td> </tr> <form name="form" method="post" action="mailto:name@domain.com?SUBJECT=Contact Form" enctype="text/plain" onSubmit="javascript:return checkForm()";> <!-- change the E-Mail address and Subject line in the form field above --> <tr> <td width="170" height="30"> <font face="verdana, arial, helvetica, sans-serif" color="#000000" size="2"> Name: </font> </td> <td width="290" height="30"> <input size="30" name="Name" /> <input type="hidden" name="AppName" /> <input type="hidden" name="AppVersion" /> <input type="hidden" name="Resolution" /> </td> </tr> <tr> <td colspan="2"> &nbsp; </td> </tr> <tr> <td width="170"> <font face="verdana, arial, helvetica, sans-serif" color="#000000" size="2"> Company Name: </font> </td> <td width="290"> <input size="30" name="Company" /> </td> </tr> <tr> <td colspan="2"> &nbsp; </td> </tr> <tr> <td> <font face="verdana, arial, helvetica, sans serif" size="2">Rate my site:</font> </td> <td> <select name="Rate"> <option selected>Choose...</option> <option>Excellent&nbsp;</option> <option>Good</option> <option>Fair</option> <option>Poor</option> </select> </td> </tr> <tr> <td colspan="2"> &nbsp; </td> </tr> <tr> <td> <font face="verdana, arial, helvetica, sans serif" size="2">Like my form?</font> </td> <td> <font face="verdana, arial, helvetica, sans serif" size="2"> Yes:&nbsp;<input type="radio" name="LikeForm" value="Yes" checked />&nbsp;&nbsp;&nbsp;&nbsp; No:&nbsp;<input type="radio" name="LikeForm" value="No" /> </font> </td> </tr> <tr> <td colspan="2"> &nbsp; </td> </tr> <tr> <td width="170"> <font face="verdana, arial, helvetica, sans-serif" color="#000000" size="2"> E-mail: </font> </td> <td width="290"> <input size="30" name="Email" /> </td> </tr> <tr> <td colspan="2"> &nbsp; </td> </tr> <tr> <td width="170"> <font face="verdana, arial, helvetica, sans-serif" color="#000000" size="2"> Comments / Query: </font> </td> <td width="290"> <font face="verdana, arial, helvetica, sans-serif" color="#000000" size="2"> <textarea name="Query" rows="7" wrap="virtual" cols="33"></textarea> </font> </td> </tr> <tr> <td colspan="2"> &nbsp; </td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="Submit" />&nbsp; <input type="reset" value="Reset" />&nbsp; <input type="button" value="<< Back" onClick="history.back(-1)" />&nbsp; </td> </tr> </tr> </form> </table> </body>