'); proceed = false; //set do not proceed flag } else { if(proceed == true) { tk_jQuery_instance(this).css('border-color',''); proceed = true; } } }); var email_address = tk_jQuery_instance("#book_call_contact_form #email"); tk_jQuery_instance.when( verfiy_email_book_call(email_address) ).done(function(msg) { if(tk_jQuery_instance("#book_call_form #book_call_email").css('display') == "block") { proceed = false; } }); if(proceed) //everything looks good! proceed... { tk_jQuery_instance("#ajax-loader_book_call").show(); //get input field values data to be sent to server post_data_set = {}; post_data_set = { 'is_buyer_or_seller' : tk_jQuery_instance('#book_call_contact_form input[name=is_buyer_or_seller]').val(), 'source' : tk_jQuery_instance('#book_call_contact_form input[name=source]').val(), 'show_captcha' : tk_jQuery_instance('#book_call_contact_form input[name=show_captcha]').val(), 'sb_id' : tk_jQuery_instance('#book_call_contact_form input[name=sb_id]').val(), 'password' : tk_jQuery_instance('#book_call_contact_form input[name=password]').val(), 'confirmpassword' : tk_jQuery_instance('#book_call_contact_form input[name=confirmpassword]').val(), 'name' : tk_jQuery_instance('#book_call_contact_form input[name=name]').val(), 'product' : tk_jQuery_instance('#book_call_contact_form input[name=product]').val(), 'email' : tk_jQuery_instance('#book_call_contact_form input[name=email]').val(), 'code' : tk_jQuery_instance('#book_call_contact_form input[name=code]').val(), 'phone2' : tk_jQuery_instance('#book_call_contact_form input[name=phone2]').val(), 'phone' : tk_jQuery_instance('#book_call_contact_form input[name=phone]').val(), 'mobile' : tk_jQuery_instance('#book_call_contact_form input[name=mobile]').val(), 'company' : tk_jQuery_instance('#book_call_contact_form input[name=company]').val(), 'datetime' : tk_jQuery_instance('#book_call_contact_form input[name=datetime]').val(), 'sid' : tk_jQuery_instance('#book_call_contact_form #book_sid').val(), 'country' : tk_jQuery_instance('#book_call_contact_form select[name=country]').val(), 'industry' : tk_jQuery_instance('#book_call_contact_form select[name=industry_bookacall]').val(), 'state_id' : tk_jQuery_instance('#book_call_contact_form #state_id').val(), 'city_id' : tk_jQuery_instance('#book_call_contact_form #city_id').val(), 'captcha' : tk_jQuery_instance('#book_call_contact_form #book_a_call_code').val(), 'msg' : tk_jQuery_instance('#book_call_contact_form textarea[name=message]').val() }; url = "/index.php?action=widgets_bookcall_book_call_now&return=json"; //Ajax post data to server //tk_jQuery_instance(".overlay").show(); tk_jQuery_instance.post(url, post_data_set, function(response){ tk_jQuery_instance("#ajax-loader_book_call").hide(); var json_object = tk_jQuery_instance.parseJSON((response)); // var json_object = (response); // alert(json_object.value ); // alert(response.value); // alert(json_object2.value); // alert(json_object2[0].value); if(json_object.value === "true"){ refresh_image_book('book_signup_image_captcha'); tk_jQuery_instance.each(json_object, function(key, val) { if(key != "value"){ tk_jQuery_instance("#book_call_contact_form #"+key).css('border-color','red'); tk_jQuery_instance("#book_call_contact_form #"+key).after('