"); } return false; }); jQuery("#contactexpert_form").submit(function(){ jQuery('#contactModal #cform_alert').html(''); var expertid = jQuery("#expert_agentID").val(); var requiredElements = new Array("contactexpert_name", "contactexpert_email", "contactexpert_phone"); // ,"contactexpert_message" if(validateForm(requiredElements)) { // sending = ''; // sending += jQuery("input#email").val() + '\n'; // jQuery("select#regionsselected option").each(function(){ // jQuery(this).attr('selected', 'selected'); // sending += jQuery(this).val() + '\n'; // }); // alert('Sending: ' + sending); // remove iframe if it exists so we can re-trigger the conversion code properly jQuery('#contactexpert_form_iframe').remove(); // hide form // jQuery('#contactexpert_form__form').hide(); // append iframe to parent // wait jQuery('#contactexpert_form:parent').append(' '); // .delay(1500) // Setting Message Sent //jQuery("#widgetboxA_link_").text("Message sent!"); // unhide form // jQuery('#contactexpert_form__form').show(); // Send data dataString = 'contactexpert_name=' + jQuery("#contactexpert_name").val(); dataString += '&contactexpert_email=' + jQuery("#contactexpert_email").val(); dataString += '&contactexpert_phone=' + jQuery("#contactexpert_phone").val(); dataString += '&contactexpert_message=' + jQuery("#contactexpert_message").val(); dataString += '&contactexpert_locationid=' + window.locationID; dataString += '&contactexpert_agentID=' + jQuery("#expert_agentID").val(); // re-added lender and other tgryffyn 4/15/015 //CSCHELL: Changed to only contact the specific clicked expert. Need to expand this in the future dataString += '&contactexpert_lenderID=' + jQuery("#expert_lenderID").val(); dataString += '&contactexpert_otherID=' + jQuery("#expert_otherID").val(); dataString += '&contactexpert_isoverride=' + jQuery("#expert_agent_isoverride").val(); dataString += '&contactexpert_expertid=' + expertid; // Probably not really used, leaving just in case jQuery('#contactModal #cform_alert').html("