Reputation: 3289
Following code, but it is not working.
$('#img').on('click', function () {
$("#new").dialog({
autoOpen: true,
position: { my: "center", at: "top+350", of: window },
width: 1000,
resizable: false,
title: 'Add User Form',
modal: true,
open: function () {
$(this).load('@Url.Action("_new", "Help")');
},
buttons: {
"Add User": function () {
addUserInfo();
},
Cancel: function () {
$(this).dialog("close");
}
}
});
return false;
});
I have a partial view name _new
in Help
Folder Under Views
.
Can someone guide me too achieve it. I am using MVC4 framework :)
Upvotes: 0
Views: 112
Reputation: 156978
You have to move the click to the anchor (a
) instead of the img
. The click event will never reach the img
.
See jsfiddle.
Upvotes: 2