I want to call this yellow colored Controller function with ajax (Image of my project). and this is my JavaScript function in View:
function notificationDivPressed(element,x,user,numberOfUsers) {
jQuery(document).ready(function ($) {
$.ajax({
url: 'MvcApplication3/Controllers/NotificationController/ChangeReadStatus',
type: "POST",
cache: false,
data: { arg: x },
success: function (data) {
}
}
});
});
}
when I write url like that (url: 'MvcApplication3/Controllers/NotificationController/ChangeReadStatus') it doesn't work. What should I change to get a desired result?