$(".get-info").on("click", function() { $(".show-info-body").html('Loading ...'); $('#show-info').modal('show'); var tag = $(this).attr("data-tag"); //alert('tag='+tag);return; var data = new FormData(); data.append("action","load-info"); data.append("tag",tag); data.append("p",""); $.ajax({ url: '/calc/info', data: data, cache: false, contentType: false, processData: false, method: 'POST', type: 'POST', success: function(res){ console.log("="+res+"="); //res = res.trimStart(); $(".show-info-body").html(res); }, error: function(jqXHR, textStatus, errorThrown) { alert("There was a problem submitting your information. Please refresh your screen."); return; } }); }); function doInfoClose() { $('#show-info').modal('hide'); }