public ActionResult MeanQ(int id)
{
Access access= db.Access.Find(id);
return PartialView("_MeanQPartial", access);
}
The partial view displayed in the above code is displayed in the JQuery dialog ... The link (onclick) that displays the partial view in the JQuery Modal dialog works well for the first click. As soon as I close this dialog box and click the link again, the Partial View does not open, as expected, in a popup form. It opens as a new page in the browser. How can I make a pop-up modal dialog connection work the same every time?
The following is the Javascript code (jQuery Modal Dialog):
<script type="text/javascript">
$(document).ready(function () {
$("#result").dialog({ width: 400, resizable: true, position: 'center', title: 'Access info', autoOpen: false,
buttons: { "Ok": function () { $(this).dialog("close"); } }
});
});
$(function () {
$('#modal').click(function () {
$('#result').load(this.href).dialog('open');
return false;
});
});
HTML link that launches the modal dialog:
@Html.ActionLink("PopUp", "MeanQ", new { id = item.AccID }, new { id = "modal" })
source
share