Untitled
unknown
plain_text
4 years ago
27 kB
14
Indexable
$( document ).ready(function(){
$('input[name="ctl00$eev14"]').change(function(){
if($("input#ctl00_eev14").prop("checked") == true || $("input#ctl00_eev15").prop("checked") == true || $("input#ctl00_eev16").prop("checked") == true){
$('input#ctl00_eev20, input#ctl00_eev21, input#ctl00_eev22, input#ctl00_eev23').val('N/A');
$('input#ctl00_eev20, input#ctl00_eev21, input#ctl00_eev22, input#ctl00_eev23').attr('readonly', true);
$("#ctl00_eev19").next().attr("disabled", "disabled");
}else{
$('input#ctl00_eev20, input#ctl00_eev21, input#ctl00_eev22, input#ctl00_eev23').val('');
$('input#ctl00_eev20, input#ctl00_eev21, input#ctl00_eev22, input#ctl00_eev23').val('').attr('readonly', false);
$("#ctl00_eev19").next().removeAttr("disabled");
}
if($("input#ctl00_eev16").prop("checked") == false){
jQuery('.period_picker_show.period_picker_clear').eq(2).trigger('click')
}
if($("input#ctl00_eev14").prop("checked") == true || $("input#ctl00_eev15").prop("checked") == true || $("input#ctl00_eev18").prop("checked") == true){
$('input#ctl00_eev17').val('N/A');
$('input#ctl00_eev17').attr('readonly', true);
}else{
$('input#ctl00_eev17').val('');
$('input#ctl00_eev17').attr('readonly', false);
}
if($("#ctl00_eev18").prop("checked") == false && $("#ctl00_eev19").val() == '')
{
jQuery('#con_inf').val("N/A");
}
else {
jQuery('#con_inf').val("");
}
});
jQuery("#ctl00_op36, #ctl00_op37, #ctl00_op58, #ctl00_op59").on("keydown keypress keyup", false);
/* 5112021 */
jQuery('#ctl00_eev11').keyup(function(e){
var mystring = jQuery(this).val();
var myRegexp = /^([^\s]{3})([^\s]{2})([^\s]{4})$/g;
var match = myRegexp.exec(mystring);
if (match){
match.shift();
mystring = match.join("-")
}
jQuery(this).val(mystring);
});
/* 5112021 */
jQuery('#ctl00_eev13').keyup(function(e){
var mystring = jQuery(this).val();
var myRegexp = /^([^\s]{3})([^\s]{3})([^\s]{4})$/g;
var match = myRegexp.exec(mystring);
if (match){
match.shift();
mystring = match.join("-")
}
jQuery(this).val(mystring);
});
jQuery('#ctl00_eev11').keyup(function(e){
var mystring = jQuery(this).val();
var myRegexp = /^([^\s]{3})([^\s]{2})([^\s]{4})$/g;
var match = myRegexp.exec(mystring);
if (match){
match.shift();
mystring = match.join("-")
}
jQuery(this).val(mystring);
if(mystring != '') {
jQuery('input#ctl00_op49').val(mystring);
jQuery("#ctl00_op31").val(mystring);
jQuery('input#ctl00_op49').attr("readonly", true);
jQuery('#ctl00_op31').attr("readonly", true);
}
else {
jQuery('input#ctl00_op49').val('');
jQuery("#ctl00_op31").val('');
jQuery('input#ctl00_op49').attr("readonly",false);
jQuery('#ctl00_op31').attr("readonly", false);
}
});
/* Address autopopulate */
jQuery('#ctl00_eev5').keyup(function(e){
var mystring = jQuery(this).val();
jQuery(this).val(mystring);
jQuery('input#ctl00_op27').val(mystring);
jQuery("#ctl00_op50").val(mystring);
if($("#ctl00_eev5").val() != '') {
jQuery('input#ctl00_op27').attr("readonly", true);
jQuery('#ctl00_op50').attr("readonly", true);
}
else {
jQuery('input#ctl00_op27').attr("readonly", false);
jQuery('#ctl00_op50').attr("readonly", false);
}
});
jQuery('#ctl00_eev7').keyup(function(e){
var mystring = jQuery(this).val();
jQuery(this).val(mystring);
jQuery('input#ctl00_op28').val(mystring);
jQuery("#ctl00_op52").val(mystring);
if($("#ctl00_eev7").val() != '') {
jQuery('input#ctl00_op28').attr("readonly", true);
jQuery('#ctl00_op52').attr("readonly", true);
}
else {
jQuery('input#ctl00_op28').attr("readonly", false);
jQuery('#ctl00_op52').attr("readonly", false);
}
});
jQuery('#ctl00_eev9').keyup(function(e){
var mystring = jQuery(this).val();
jQuery(this).val(mystring);
jQuery('input#ctl00_op30').val(mystring);
jQuery("#ctl00_op54").val(mystring);
if($("#ctl00_eev9").val() != '') {
jQuery('input#ctl00_op30').attr("readonly", true);
jQuery('#ctl00_op54').attr("readonly", true);
}
else {
jQuery('input#ctl00_op30').attr("readonly", false);
jQuery('#ctl00_op54').attr("readonly", false);
}
});
jQuery('#ctl00_eev8').on('change', function() {
var mystring = jQuery(this).val();
jQuery(this).val(mystring);
if(mystring != '') {
jQuery('#ctl00_op29').val(mystring);
jQuery('#ctl00_op53').val(mystring);
jQuery('#ctl00_op29').attr("readonly", true);
jQuery('#ctl00_op53').attr("readonly", true);
}
else {
jQuery('#ctl00_op29').val('');
jQuery('#ctl00_op53').val('');
jQuery('#ctl00_op29').attr("readonly", false);
jQuery('#ctl00_op53').attr("readonly", false);
}
});
jQuery("#ctl00_op10, #ctl00_op10_0, #ctl00_op11, #ctl00_op11_1, #ctl00_op12, #ctl00_op12_2, #ctl00_op13, #ctl00_op13_3, #ctl00_op14, #ctl00_op14_4, #ctl00_op8, #ctl00_op8_8_5, #ctl00_op9, #ctl00_op9_6").keyup(function(e){
var mystring = jQuery(this).val();
jQuery(this).val(mystring);
if(mystring != '') {
jQuery(this).next().find("input[type=radio]").addClass('validate[required]');
}
else {
jQuery(this).next().find("input[type=radio]").removeClass('validate[required]');
}
});
jQuery("#ctl00_op60, #ctl00_op61, #ctl00_op62").bind('change',function(){
var value= jQuery(this).val();
if(value != "") {
jQuery(this).val(parseFloat(value).toFixed(2));
} else {
jQuery(this).val(parseFloat(0).toFixed(2));
}
});
$('input#ctl00_resident_yes').change(function() {
if($('input#ctl00_resident_yenker_yes:checked').length > 0){
$('input#ctl00_resident_yenker_yes').attr('checked', false);
}
});
$('input#ctl00_resident_yenker_yes').change(function() {
if($('input#ctl00_resident_yes:checked').length > 0){
$('input#ctl00_resident_yes').attr('checked', false);
}
});
document.getElementById("ctl00_op91").disabled = true;
jQuery("#payday").val('friday');
document.getElementById("weekly1").disabled = true;
document.getElementById("weekly2").disabled = true;
document.getElementById("weekly3").disabled = true;
jQuery("#ctl00_op86").attr('readonly', true);
jQuery("input[name=preparer_nametitle]").attr('readonly', true);
jQuery("#otherweekly").attr('readonly', true);
/* Use first name field */
jQuery('#ct100_fname').keyup(function(e){
var mystring = jQuery(this).val();
var mname = jQuery("#ct100_mname").val();
var lname = jQuery("#ct100_lname").val();
jQuery('input#ctl00_fnameop88').val(mystring);
jQuery('input#ctl00_fnameop83').val(mystring);
jQuery('input#ctl00_op24').val(mystring);
jQuery('input#ctl00_op47').val(mystring);
/* 5112021 */
jQuery('input#ctl00_eev2').val(mystring);
if(mystring != '') {
jQuery('input#ctl00_eev2').attr("readonly", true);
jQuery('input#ctl00_op24').attr("readonly", true);
jQuery('input#ctl00_op47').attr("readonly", true);
}
else {
jQuery('input#ctl00_eev2').attr("readonly", false);
jQuery('input#ctl00_op24').attr("readonly", false);
jQuery('input#ctl00_op47').attr("readonly", false);
}
jQuery('input[name=employee_name_print]').val(mystring + " " + mname + " " + lname);
});
jQuery('#ct100_mname').keyup(function(e){
var mystring = jQuery(this).val();
var fname = jQuery("#ct100_fname").val();
var lname = jQuery("#ct100_lname").val();
jQuery('input#ctl00_mnameop88').val(mystring);
jQuery('input#ctl00_mnameop83').val(mystring);
jQuery('input#ctl00_op25').val(mystring);
jQuery('input#ctl00_mnameop47').val(mystring);
jQuery('input[name=employee_name_print]').val(fname + " " + mystring + " " + lname);
/* 5112021 */
jQuery('input#ctl00_eev3').val(mystring);
if(mystring != '') {
jQuery('input#ctl00_eev3').attr("readonly", true);
jQuery('input#ctl00_op25').attr("readonly", true);
jQuery('input#ctl00_mnameop47').attr("readonly", true);
}
else {
jQuery('input#ctl00_eev3').attr("readonly", false);
jQuery('input#ctl00_op25').attr("readonly", false);
jQuery('input#ctl00_mnameop47').attr("readonly", false);
}
});
jQuery('#ct100_lname').keyup(function(e){
var mystring = jQuery(this).val();
var fname = jQuery("#ct100_fname").val();
var mname = jQuery("#ct100_mname").val();
jQuery('input#ctl00_lnameop88').val(mystring);
jQuery('input#ctl00_lnameop83').val(mystring);
jQuery('input#ctl00_op26').val(mystring);
jQuery('input#ctl00_op48').val(mystring);
jQuery("#rep_name").val(fname + " " + mystring);
jQuery("#rep_name_1").val(fname + " " + mystring);
jQuery('input[name=employee_name_print]').val(fname + " " + mname + " " + mystring);
/* 5112021 */
jQuery('input#ctl00_eev1').val(mystring);
if(mystring != '') {
jQuery('input#ctl00_eev1').attr("readonly", true);
jQuery('input#ctl00_op26').attr("readonly", true);
jQuery('input#ctl00_op48').attr("readonly", true);
}
else {
jQuery('input#ctl00_eev1').attr("readonly", false);
jQuery('input#ctl00_op26').attr("readonly", false);
jQuery('input#ctl00_op48').attr("readonly", false);
}
});
jQuery("#ctl00_op36, #ctl00_op37, #ctl00_op58, #ctl00_op59").on("focus", function() {
jQuery(this).on("keydown", function(event) {
if (event.keyCode === 38 || event.keyCode === 40) {
event.preventDefault();
}
});
});
jQuery('#ctl00_op27').keyup(function(e){
var mystring = jQuery(this).val();
jQuery('input#ctl00_op50').val(mystring);
});
jQuery('#ctl00_op28').keyup(function(e){
var mystring = jQuery(this).val();
jQuery('input#ctl00_op52').val(mystring);
});
jQuery('#ctl00_op30').keyup(function(e){
var mystring = jQuery(this).val();
jQuery('input#ctl00_op54').val(mystring);
});
jQuery('#ctl00_op31, #ctl00_op49').on('input', function(){
var mystring = jQuery(this).val().replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');
jQuery(this).val(mystring);
});
jQuery('#ctl00_op36, #ctl00_op37').on('input', function(){
var itsval1 = jQuery('#ctl00_op36').val();
var itsval2 = jQuery('#ctl00_op37').val();
if(itsval1 !="" && itsval1 >0){
jQuery('input#ctl00_op38, input#ctl00_op3338').val(itsval1);
}
if(itsval2 !="" && itsval2 >0){
jQuery('input#ctl00_op38, input#ctl00_op3338').val(itsval2);
}
if(itsval1 !="" && itsval1 >0 && itsval2 !="" && itsval2 >0){
var itsval3 = parseInt(itsval1) + parseInt(itsval2);
jQuery('input#ctl00_op38, input#ctl00_op3338').val(itsval3);
}
if(itsval1 =="" && itsval2 ==""){
jQuery('input#ctl00_op38, input#ctl00_op3338').val("");
}
if(itsval1 == 0 && itsval2 == 0){
jQuery('input#ctl00_op38, input#ctl00_op3338').val("0");
}
});
jQuery('#ctl00_op49').keyup(function(e){
var mystring = jQuery(this).val();
var myRegexp = /^([^\s]{3})([^\s]{2})([^\s]{4})$/g;
var match = myRegexp.exec(mystring);
if (match){
match.shift();
mystring = match.join("-")
}
jQuery(this).val(mystring);
});
$("#secureform").submit(function(){
setTimeout(function(){
console.log($('.formError').length);
var ok = true;
if($('.formError').length > 0){
ok = false;
return false;
}
if(ok){
var fname = $('#ct100_fname').val();
var lname = $('#ct100_lname').val();
var email = $('#ct100_mail').val();
var company = 'Community Homecare';
jQuery.ajax({
type : "post",
url : "https://commhealthcare.com/sendemail_application_attachment.php",
data : { lname:lname, fname:fname, email:email, company:company },
dataType: 'json',
success: function(response){
console.log(response);
},
fail: function(xhr, textStatus, errorThrown){
alert(xhr + ' --'+textStatus);
}
});
console.log('test123');
}
}, 500);
});
$('input#ctl00_op109').click(function(event){
event.preventDefault();
var validate = true;
if($('#ctl00_op36').val() != ""){
var itsval = $('#ctl00_op36').val();
if(itsval%2000 > 0){
$('#ctl00_op36').validationEngine('showPrompt','* Only multiples of 2000 are accepted.','missing','bottomLeft',1);
$('#ctl00_op36').focus();
validate = false;
return false;
}else{
$('#ctl00_op36').validationEngine('hide');
}
}
if($('#ctl00_op37').val() != ""){
var itsval = $('#ctl00_op37').val();
if(itsval%500 > 0){
$('#ctl00_op37').validationEngine('showPrompt','* Only multiples of 500 are accepted.','missing','bottomLeft',1);
$('#ctl00_op37').focus();
validate = false;
return false;
}else{
$('#ctl00_op37').validationEngine('hide');
}
}
/* Add NA to i9 form */
$('#ctl00_eev4').each(function(){
var mystring = $(this).val();
if($(this).val() == "") {
$("#ctl00_eev4").val('N/A');
}
else {
$("#ctl00_eev4").val(mystring);
}
});
$('#ctl00_eev3').each(function(){
var mystring = $(this).val();
if($(this).val() == "") {
$("#ctl00_eev3").val('N/A');
}
else {
$("#ctl00_eev3").val(mystring);
}
});
$('#ctl00_eev6').each(function(){
var mystring = $(this).val();
if($(this).val() == "") {
$("#ctl00_eev6").val('N/A');
}
else {
$("#ctl00_eev6").val(mystring);
}
});
$('input.i91').each(function(){
if($(this).val() == "")
{
if($(this).attr('type') == 'email'){
$(this).removeClass('validate[required,custom[email]]');
$(this).val('N/A');
}
}
else
{
if($(this).val() !='N/A' && $(this).attr('type') == 'email' && $(this).hasClass("validate[required,custom[email]]") == false){
$(this).addClass('validate[required,custom[email]]');
}
if($(this).val() !='N/A' && $(this).attr('type') == 'tel' && $(this).hasClass("validate[required,custom[phone_usa]]") == false){
$(this).addClass('validate[required,custom[phone_usa]]');
}
}
});
if($('#ctl00_op31').val() != ""){
var ssn = $('#ctl00_op31').val();
regexp = /^(?!(000|666|9))(\d{3}-?(?!(00))\d{2}-?(?!(0000))\d{4})$/;
if(regexp.test(ssn))
{
$('#ctl00_op31').validationEngine('hide');
}
else
{
$('#ctl00_op31').validationEngine('showPrompt','* Invalid social security number. Use format NNN-NN-NNNN','missing','bottomLeft',1);
$('#ctl00_op31').focus();
validate = false;
return false;
}
}
if($('#ctl00_op49').val() != ""){
var ssn = $('#ctl00_op49').val();
regexp = /^(?!(000|666|9))(\d{3}-?(?!(00))\d{2}-?(?!(0000))\d{4})$/;
if (regexp.test(ssn))
{
$('#ctl00_op49').validationEngine('hide');
}
else
{
$('#ctl00_op49').validationEngine('showPrompt','* Invalid social security number. Use format NNN-NN-NNNN','missing','bottomLeft',1);
$('#ctl00_op49').focus();
validate = false;
return false;
}
}
if($('#ctl00_op30').val() != ""){
var zip = $('#ctl00_op30').val();
regexp = /(^\d{5}$)/;
if(regexp.test(zip))
{
$('#ctl00_op30').validationEngine('hide');
}
else{
$('#ctl00_op30').validationEngine('showPrompt','* Invalid zip format','missing','bottomLeft',1);
$('#ctl00_op30').focus();
validate = false;
return false;
}
}
if($('#ctl00_op54').val() != ""){
var zip = $('#ctl00_op54').val();
regexp = /(^\d{5}$)/;
if(regexp.test(zip))
{
$('#ctl00_op54').validationEngine('hide');
}
else{
$('#ctl00_op54').validationEngine('showPrompt','* Invalid zip format','missing','bottomLeft',1);
$('#ctl00_op54').focus();
validate = false;
return false;
}
}
/* start signature requirements */
var reset = $('#ctl00_op22').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok > 0){
if(ok < 450){
$("[id='ctl00_op22']").validationEngine('showPrompt','The Signature you used does not meet our requirements, please redraw your signature.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#ctl00_op22").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='ctl00_op22']").validationEngine('hide');
}
}
var reset = $('#ctl00_op87').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok > 0){
if(ok < 450){
$("[id='ctl00_op87']").validationEngine('showPrompt','The Signature you used does not meet our requirements, please redraw your signature.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#ctl00_op87").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='ctl00_op87']").validationEngine('hide');
}
}
var reset = $('#ctl00_op84').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok > 0){
if(ok < 450){
$("[id='ctl00_op84']").validationEngine('showPrompt','The Signature you used does not meet our requirements, please redraw your signature.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#ctl00_op84").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='ctl00_op84']").validationEngine('hide');
}
}
var reset = $('#ctl00_op42').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok > 0){
if(ok < 450){
$("[id='ctl00_op42']").validationEngine('showPrompt','The Signature you used does not meet our requirements, please redraw your signature.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#ctl00_op42").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='ctl00_op42']").validationEngine('hide');
}
}
var reset = $('#ctl00_op63').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok > 0){
if(ok < 450){
$("[id='ctl00_op63']").validationEngine('showPrompt','The Signature you used does not meet our requirements, please redraw your signature.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#ctl00_op63").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='ctl00_op63']").validationEngine('hide');
}
}
var reset = $('#cke_ele_dd_1').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok > 0){
if(ok < 450){
$("[id='cke_ele_dd_1']").validationEngine('showPrompt','The Signature you used does not meet our requirements, please redraw your signature.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#cke_ele_dd_1").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='cke_ele_dd_1']").validationEngine('hide');
}
}
var reset = $('#cke_ele_ack_1').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok > 0){
if(ok < 450){
$("[id='cke_ele_ack_1']").validationEngine('showPrompt','The Signature you used does not meet our requirements, please redraw your signature.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#cke_ele_ack_1").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='cke_ele_ack_1']").validationEngine('hide');
}
}
/* 5112021 */
var reset = $('#ctl00_eev24').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok > 0){
if(ok < 450){
$("[id='ctl00_eev24']").validationEngine('showPrompt','The Signature you used does not meet our requirements, please redraw your signature.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#ctl00_eev24").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='ctl00_eev24']").validationEngine('hide');
}
}
/* 5112021 */
if($('#ctl00_eev13').val() != "" && $('#ctl00_eev13').val() != "N/A"){
var phone = $('#ctl00_eev13').val();
regexp = /(^\d{3}-\d{3}-\d{4}$)/;
if (regexp.test(phone))
{
$('#ctl00_EmploymentArray_ctl00_EmployerPhone_EmployerPhone').removeClass('validate[required]');
}
else
{
$('#ctl00_eev13').addClass('validate[required]');
$('#ctl00_eev13').validationEngine('showPrompt','* Invalid phone number','missing','bottomLeft',1);
$('#ctl00_eev13').focus();
validate = false;
return false;
}
}
/* 5112021 */
if($('#ctl00_eev11').val() != "" && $('#ctl00_eev11').val() != "N/A"){
var ssn = $('#ctl00_eev11').val();
regexp = /^(?!(000|666|9))(\d{3}-?(?!(00))\d{2}-?(?!(0000))\d{4})$/;
if(regexp.test(ssn))
{
$('#ctl00_eev11').validationEngine('hide');
}
else
{
$('#ctl00_eev11').validationEngine('showPrompt','* Invalid social security number. Use format NNN-NN-NNNN','missing','bottomLeft',1);
$('#ctl00_eev11').focus();
validate = false;
return false;
}
}
/* 5112021 */
if($('#ctl00_eev9').val() != "" && $('#ctl00_eev9').val() != "N/A"){
var zip = $('#ctl00_eev9').val();
regexp = /(^\d{5}$)/;
if(regexp.test(zip))
{
$('#ctl00_eev9').validationEngine('hide');
}
else{
$('#ctl00_eev9').validationEngine('showPrompt','* Invalid zip format','missing','bottomLeft',1);
$('#ctl00_eev9').focus();
validate = false;
return false;
}
}
/* 5112021 */
if($("input#ctl00_eev16").prop("checked") == true){
if($('#ctl00_eev17').val() == "" || $('#ctl00_eev17').val() == "N/A"){
$('#ctl00_eev17').val("");
$('#ctl00_eev17').addClass('validate[required]');
$('#ctl00_eev17').validationEngine('showPrompt','* This field is required','missing','bottomLeft',1);
$('#ctl00_eev17').focus();
validate = false;
return false;
}
}else{
$('#ctl00_eev17').removeClass('validate[required]');
$('#ctl00_eev17').validationEngine('hide');
}
/* end signature requirements */
/* start dd section js */
var isval = false;
$("table.dd_section input[type='text']").each(function(){
if(!$(this).hasClass("date_picker_value")){
if($(this).val() !=""){
isval = true;
}
}
});
if(isval){
$("table.dd_section input[type='text']").each(function(){
if(!$(this).hasClass("date_picker_value") && $(this).attr("name")!="dd_apt" && $(this).attr("name")!="dd_saving_routingnumber" && $(this).attr("name")!="dd_saving_account" && $(this).attr("name")!="dd_saving_deposite"){
if($(this).val() ==""){
$(this).addClass('validate[required]');
/* $(this).validationEngine('showPrompt','* This field is required','missing','bottomLeft',1);
validate = false; */
}
}
});
var reset = $('#cke_ele_dd_1').next().attr('onclick');
var sign = reset.substr(0, reset.indexOf('.'));
ok = eval(sign).isSigned();
if(ok < 50){
$("[id='cke_ele_dd_1']").validationEngine('showPrompt','Please sign here.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#cke_ele_dd_1").offset().top }, 600);
validate = false;
return false;
}else{
$("[id='cke_ele_dd_1']").validationEngine('hide');
}
/* return false; */
}else{
$("#cke_ele_dd_1").validationEngine('hide');
$("table.dd_section input[type='text']").each(function(){
$(this).removeClass('validate[required]');
$(this).validationEngine('hide');
});
}
/* end dd section js */
jQuery('#ctl00_eev10').on('change', function() {
var dob = $(this).val();
var dob_date = new Date(dob);
var today = new Date();
var nowYear = today.getFullYear();
var pastYear = dob_date.getFullYear();
var age = nowYear - pastYear;
if(age<18) {
$("#ctl00_eev10").validationEngine('showPrompt','Only applicant above the age of 18 are allowed.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#ctl00_eev10").offset().top }, 900);
validate = false;
return false;
}
else {
$(this).validationEngine('hide');
}
});
/* DOb custom js*/
var dob = $('#ctl00_eev10').val();
var dob_date = new Date(dob);
var today = new Date();
var nowYear = today.getFullYear();
var pastYear = dob_date.getFullYear();
var age = nowYear - pastYear;
if(age<18) {
$("#ctl00_eev10").validationEngine('showPrompt','Only applicant above the age of 18 are allowed.','missing','bottomLeft',1);
$("html, body").animate({ scrollTop: $("#ctl00_eev10").prev().offset().top }, 900);
$(".period_picker_input").focus();
validate = false;
return false;
}
else {
$("#ctl00_eev10").validationEngine('hide');
validate == true;
}
if(validate == true){
$('#secureform').submit();
}
});
$("#ctl00_op84").find('input[name="ctl00_op84_caption"]').val('');
$("#ctl00_eev24").find('input[name="ctl00_eev24_caption"]').val('');
$("#ctl00_op42").find('input[name="ctl00_op42_caption"]').val('');
$("#ctl00_op63").find('input[name="ctl00_op63_caption"]').val('');
});Editor is loading...