剑道弹出窗口

时间:2013-07-19 10:25:51

标签: jquery kendo-ui popupwindow

您好我想在点击页面上的按钮时在弹出窗口中加载div。这是我的示例代码

    <input type="button" name="btnload" id = "btnload" onclick="loadpopupwindow();"/>

         <script id="customPopUpTemplate" type="text/x-kendo-template">
    <div class="k-edit-label">ProductName: </div>
    <div class="k-edit-field">
        <input name="ProductName" required class="k-textbox"/>
    </div>

    <div class="k-edit-label">Discontinued: </div>
    <div class="k-edit-field">
        <input name="Discontinued" type="checkbox" />
    </div>
</script>

我正在使用kendo和jquery

1 个答案:

答案 0 :(得分:0)

试试这个,

Onclick of this link tag:
 <li class="topicheight">    
      <a class="topiclistone" onclick="displayContent()" href="javascript: void(0)">                           
 </li>

DIV tag display in popup:
    <div id="windowContentMessage">
                </div>

JS function which open popup:

    function displayContent() {
                if (ContentTitle != '') {
                    $('#windowContentMessage').html(HTMLDescription + '<input id=\"btnOkHowItWorks\" class=\"k-button btninput\" style=\"width: 60px;margin-left:230px;\" type=\"button\" value=\"Ok\" />');
                    ContentWindow = $('#windowContentMessage').kendoWindow({
                        title: ContentTitle,
                        visible: false,
                        modal: true,
                        resizable: true,
                        width: '550px'                        
                    }).data("kendoWindow");
                    ContentWindow.open();
                    ContentWindow.center();
                }
            }

如果有任何问题,请告诉我。