This is done to prevent double/triple submission and notify the visitor that everything is taken care of:
form – create a hidden animation div below the submit button:
1 2 3 |
<div id="submitBtn" ><input id="submitForm" type="submit" value="Download" onClick="checkform(); return false;" ></input></div> <div id="loadingAnm" style="display:none;"><img src="loader.gif" width="43" height="11" align="left" /><br/>Submitting, please wait</div> |
the actual switch (jQuery, at the end of a successful field validation):
1 2 3 |
$("#submitBtn").hide(); $("#loadingAnm").show(); $("#ContactForm").submit(); |