i'm building a view for editing a variable length list using this http://blog.stevensanderson.com/2010/01/28/editing-a-variable-length-list-aspnet-mvc-2-style/ solution.
Here's my ActionLink:
<%= Html.ActionLink("Add another...", "AddReceiver", null, new { id = "addItem" })%>
And here's my javascript code:
$("#addItem").click(function () {
$.ajax({
url: this.href,
cache: false,
success: function (html) { $("#editorRows").append(html); }
});
return false;});
The problem is that click event is not fired, so i'm getting not the ajaxly updated view, but an empty page with my partial view, gotten from the AddReceiver action.
Any suggestions, guys?