Back

Ajax Code

Copy Below Code View As A Text File Show Text Only Show API Edit Code
                            

function cal_next(m,y,l){ $(".loading_div").show(); var datastr ="m="+m+"&y="+y+"&l="+l; $.ajax({ type: "POST", url: "<?php echo base_url();?>loc_sa_appointment/calendar/<?php echo $loc_id;?>", data: datastr, success: function(html2){ $("#sa_cal").html(html2); $(".loading_div").hide(); $('[data-toggle="popover"]').popover(); $('[data-toggle="tooltip"]').tooltip(); } }); } /////////////////////////////FORM Submit////////////////////////// $(".spinner").show(); var frmID = document.getElementById('frm_step3'); $.ajax({ type: "POST", url: s + "/wp-content/plugins/ml_gift_card/gift_process.php", data: new FormData(frmID), contentType: false, cache: false, // To unable request pages to be cached processData: false, success: function(html2) { $(".spinner").hide(); //console.log(html2); // window.location = html2; if (html2 == 'ok') { alert('DONE'); } else { alert(html2); } }, error: function(jqXHR, textStatus, errorThrown) { $(".spinner").hide(); if(textStatus==="timeout") { alert("ERROR: Connection problem"); //Handle the timeout } else { alert("ERROR: There is something wrong."); } } });