//============================================================================ var handlePaypalLinks = function() { console.log("TEST_R"); jQuery('#paypal-link').click(function(e) { e.preventDefault(); var paypalURL = jQuery('#paypal-link').attr('href'); if (document.querySelector('form[name="Monthly"]').reportValidity()) { // Go to the PayPal destination URL console.log("the form validity is TRUE!!!"); } else { console.log("the form validity is false"); } }); } //============================================================================ function doSaveContact() { const form_content_str = jQuery("#mainForm").serialize(); const query_params = 'Email=' + customerEmail + form_content_str; ha_httpGetRequest("https://www.housingalerts.com/o2/wp-content/themes/focusblog-housingalerts/savecontact-lite.php?" + query_params); } //============================================================================ function ha_httpGetRequest(url, callback) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { //alert(this.responseText); callback(); } }; xmlhttp.open("GET", url, true); xmlhttp.send(); } //============================================================================ /* */