0

我正在尝试将部分视图加载到弹出对话框中。

我已经为有效的对话框创建了代码。我想知道我如何能够将这个部分视图加载到对话框中,尽管链接点击下面提供了关于链接的所有代码,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>
4

2 回答 2

0

使用本机 javascript 或 jquery 将 XMLHttpRequest 设置为部分视图的 URL,并将输出附加到模式对话框内的 div 之一。我正在使用 jquery

          function renderPart(element, templateId){
           $.ajax({
             url : '',
             type : 'GET',
             succsess : function(response)
             {  $("#divIDinsideModalBox").html(response); makeDialogBox();   }
           });
         }
于 2013-05-01T09:11:14.013 回答
0
jQuery.get("InsertURLHere", { id: templateId }, function (data) {
               // alert(data);
               $("divpart").append(data);
       });
于 2013-05-01T09:37:12.303 回答