$(document).ready(
function() { var options = {url:
"http://localhost/CTS/2010 Design/ContactHandler.ashx",success:
function(result) {$(
"#dThinking").hide();$(
"#ContactResponse").show(); //alert(result);},
submit:
function() {$(
"#dMakeContact").hide();$(
"#dThinking").show();}
};
$(
"#ContactForm").ajaxForm(options);$(
"#dThinking").hide();$(
"#ContactResponse").hide();$(
"input.PhoneMask").mask("(999) 999-9999");$(
'.error').hide();$(
"#ContactForm").validate();});
HTML page:
<
form id="ContactForm" action="contact.aspx" method="post"> <fieldset id="contactform"> <legend>Contact CTS via the form below:</legend> <div id="dMakeContact" class="group"> <table border="0" width="98%" cellpadding="3" cellspacing="5" style="margin: 20px 0 0 0px;"> <tr> <td valign="bottom" align="right" style="width:32%"> <div class="FormTitle">Name:
</div> </td> <td valign="top"> <input id="txtName" name="txtName" maxlength="200" class="Form required" style="width: 200px;" /> <span class="Highlight">*</span> </td> </tr> <tr> <td valign="bottom" align="right"> <div class="FormTitle">Company:
</div> </td> <td valign="top"> <input id="txtCompany" name="txtCompany" maxlength="200" class="Form" style="width: 200px;" /> </td> </tr> <tr> <td valign="bottom" align="right"> <div class="FormTitle">Email Address:
</div> </td> <td valign="top"> <input id="txtEmail" name="txtEmail" maxlength="200" class="Form required email" style="width: 200px;" /> <span class="Highlight">*</span> </td> </tr> <tr> <td valign="bottom" align="right"> <div class="FormTitle">Phone Number:
</div> </td> <td valign="top"> <input id="txtPhone" name="txtPhone" maxlength="200" class="Form phone PhoneMask" style="width: 200px;" /> </td> </tr> <tr> <td valign="bottom" align="right"> <div class="FormTitle">Request Category:
</div> </td> <td valign="top"> <select id="ddlCategory" name="ddlCategory" class="Form required"> <option value="">-- Select --</option> <option value="Request for Quote">Request for Quote</option> <option value="Website Information">Website Information</option> <option value="Support Inquiry">Support Inquiry</option> <option value="Support Contract">Support Contract</option> <option value="Network Setup">Network Setup</option> <option value="Email">Email</option> <option value="Graphic Design">Graphic Design</option> <option value="Other">Other</option> </select><span class="Highlight">*</span> </td> </tr> <tr> <td valign="bottom" align="right"> <div class="FormTitle">Subject:
</div> </td> <td valign="top"> <input id="txtSubject" name="txtSubject" maxlength="200" class="Form required" style="width: 200px;" /> <span class="Highlight">*</span> </td> </tr> <tr> <td valign="top" align="right"> <div class="FormTitle">Request:
</div> </td> <td valign="top"> <textarea id="txtRequest" name="txtRequest" class="Form required" cols="200" rows="10" style="width: 200px;"></textarea> <span class="Highlight">*</span> </td> </tr> <tr> <td valign="top" colspan="2"> <input type="submit" name="btnSubmit" id="btnSubmit" class="Button" value="Send" /> </td> </tr> </table> </div> <div id="dThinking" class="Highlight"> <br /> <br /> <p> <span>Sending.... </span> </p> </div> <div id="ContactResponse"> <p>Thanks!
</p> <p>Your request has been received and will be responded to shortly.
</p> </div> </fieldset> </form>