我想从 mvc4 的视图中打开一个模型弹出窗口。该弹出页面的截图是>
我不知道如何在 MVC 中打开模型弹出窗口?
目前我正在使用window.showmodeldialog,但它看起来效率不高。我用谷歌搜索了它,但找不到合适的结果。我打开弹出窗口的当前页面的代码是:-
@{
Layout = null;
}
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Claim Audit Admin </title>
@* @Styles.Render("~/Content/logincss")
@Styles.Render("~/Content/workbenchcss")
@Styles.Render("~/Content/appFramecss")*@
<link href="~/Content/workbench.css" rel="stylesheet" />
<link href="~/Content/style.css" rel="stylesheet" />
<link href="~/Content/Button.css" rel="stylesheet" />
<link href="~/Content/TabbedSection.css" rel="stylesheet" />
<link href="~/Content/search.css" rel="stylesheet" type="text/css" />
<link href="~/Content/searchFirefox.css" rel="stylesheet" type="text/css" />
<link href="~/Content/normalize.css" rel="stylesheet" type="text/css" />
<script src="~/Scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
var staticURL = "https://static-dev.mymitchell.com";
var NoResultMsg = "";
function enableButton() {
button.disableSpinner('#spinnertest');
button.disableSpinner('#Smallbtn');
}
$(function () {
applyFilter(true);
toggleSelectBtnOnCheck();
$('#CreateSet').click(function (e) {
openPopup();
});
});
function toggleSelectBtnOnCheck() {
//Register checkbox click handler to be called when Ajax requests complete.
$('.searchResultTable').ajaxComplete(function () {
$(':checkbox').click(function () // Bind the following anonymous function to all checkboxes click event.
{
//Check if any checkbox is checked...
if ($('input:checkbox:checked').length > 0) {
button.enable('#btnDelete');
}
else {
button.disable('#btnDelete');
}
});
});
}
function openPopup() {
var url = "/ClaimAuditAdmin/CreateNewSet/";
var vReturnValue = openModalWindow(url, 'Create New Claims Audit Set', '300', '150', 'no');
}
//This function is used to open any page as modal popup
function openModalWindow(sPage, sTitle, iWidth, iHeight, bScroll) {
var sModalPage = sPage;
if (sPage.indexOf("?") > 0) {
sModalPage += "&";
} else {
sModalPage += "?";
}
sModalPage += "title=" + sTitle
sWinProps = 'scroll:no; status: no; help: no;dialogWidth:19;dialogHeight:12;';
var vRetVal = window.showModalDialog(sModalPage, window, sWinProps)
return vRetVal;
}
function blurOn() {
if (document.all.item("screenBlur") != null) {
document.all.screenBlur.style.display = '';
}
}
function blurOff() {
if (document.all.item("screenBlur") != null) {
document.all.screenBlur.style.display = 'none';
}
}
</script>
<script src="http://localhost/static/jquery/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script src="http://localhost/static/jquery/jquery-ui/1.8.23/jquery-ui.min.js" type="text/javascript"></script>
<script src="~/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="~/Scripts/searchresults.js"></script>
<script src="~/Scripts/search.js" type="text/javascript"></script>
</head>
<body>
<table>
<tr>
<td class="breadcrumbs">
@Html.Mitchell().BreadCrumb().AddCrumb(@CultureAPI.GlobalizeString("ClaimsAuditAdmin", "UAM_MANAGE_CLAIM_AUDIT"))
</td>
</tr>
<tr>
<td style="text-align: right">
**@Html.Mitchell().Button().Name("CreateSet").Text(@CultureAPI.GlobalizeString("ClaimsAuditAdmin", "STATIC_CREATE_NEW_SET")).Enabled(true)**
</td>
<td></td>
</tr>
<tr>
<td>
<div>
@(Html.Mitchell().SearchResult("SearchResult", "../UnsentQueueService2.asmx/GetData")
.AddFilterSection("_ClaimAuditAdminView", "Filter")
.ExpandCriteria()
.ShowTopCap()
.HighlightRow()
.ShowCheckBoxes()
.AddFooterSection(@<text>
<table>
<tr>
<td>
@(Html.Mitchell()
.Button().Name("btnDelete").Text("Delete").Enabled(false)
)
</td>
</tr>
</table>
</text>)
)
</div>
</td>
</tr>
</table>
</body>
</html>
由于我是 mvc 新手,任何人都可以提供一些链接以在 mvc4 中打开模型弹出窗口吗?