8/4/14

calling controller action on button click using AJAX

function test()
{
 alert("button is clicked");
$.ajax({
 url: "/Employee/Test",
 type: 'POST',
//data: { TA: $("select#ToAccountBalance").val() },
//success: function (response) {
// document.getElementById("FromAccountBalance").value = response
//},
//error: function (xhr) {
// alert("Something went wrong, please try again");
//}
});
}

No comments: