Answers for "ajax on click"

6

ajax syntax in javascript

var id = empid;

$.ajax({
    type: "POST",
    url: "../Webservices/EmployeeService.asmx/GetEmployeeOrders",
    data: "{empid: " + empid + "}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(result){
        alert(result.d);
        console.log(result);
    }
});
Posted by: Guest on September-30-2020
0

onclick event in jquery ajac

$('a').click(function(){
$.ajax({
type: "POST",
url: "mysimplepage.php",
async: true,
data: { logDownload: true, file: $(this).attr("name") }
});
return false;
});
Posted by: Guest on July-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language