I must call this javascript function from inside a view:
$("#addCompositionItem").click(function (carrier) {
$.mobile.loading('show');
$.ajax({
url: this.href,
cache: false,
success: function (html) {
$("#Compositions"+carrier).append(html);
$("#newServicePageContent").trigger("create");
$.mobile.loading('hide');
}
});
return false;
});
As you can see, carrier is a parameter used to load html portions in different containers. How can I pass this value from an action link? I'm trying with:
@Html.ActionLink("Text", "ActionName", "ControllerName", new { id = "addCompositionItem", carrier="XYZ",type = "submit" })
but with no success