我正在尝试将部分视图加载到弹出对话框中。
我已经为有效的对话框创建了代码。我想知道我如何能够将这个部分视图加载到对话框中,尽管链接点击下面提供了关于链接的所有代码,java script and popup dialog box
。
HTML 代码:
<div id="mediaContainer" class="jqmDialog" style= "width:750px; left:23%; top:18%; height:525px; ">
<div class="jqmnTitle jqDrag">
<h1>Subscriptions</h1>
</div>
<img class="jqmClose" style="position: absolute; cursor: pointer; right: 2px; top: 2px;" onclick="closeDialog();" src="@VirtualPathUtility.ToAbsolute("~/Content/images/close.gif")"
alt="Close" height="20px" width="20px" />
<center>
<div id="divpart"></div>
</center>
</div>
JAVA脚本:
function renderPart(element, templateId) {
makeDialogBox();
jQuery.get(FBUrl, { id: templateId }, function (data) {
// alert(data);
$("divpart").append(data);
});
}
超链接:
<a href="#" style="text-decoration: underline;" class = "lnkShowMarketRates" onclick="renderPart(this.id, @item.id);">Subscriptions</a>