$(document).ready(function(){ jQuery.validator.addMethod("checkbreedother", function(value, element) { if($('#breedSel')[0].value==101 && value=='') { return false; } return true; }, "Enter your horses breed"); var form = $("#frmTs"); var d = new Date(); var optionsTS = { dataType: 'json', beforeSubmit:doTSValidation, url: '/supportForms/ajaxTroubleShooting/'+d.getTime(), success: successTS, resetForm: true }; function doTSValidation(formData, jqForm, options) { if(form.valid()) { onSubmit('#frmTS'); return true; } else { $('#resultSave').html("Please specify the missing information"); $('#resultSave').attr("class","resultErr"); $('#resultSave').show(); $.scrollTo( '#resultSave', 800, {margin:true} ); setTimeout('$("#resultSave").hide(500);', 5000 ); return false; } } function successTS(data) { var afterSubmitParams = new Array(); if(data['success']!=undefined && data['success'] == 1) { afterSubmitParams["isError"] = false; $('#resultSave').html('Thank you for your message. We will try to send you an answer soon as possible
What do you want to do next?
I want to: