Hi, I must be doing something wrong. No matter what I do, I cannot get the page to load with the kendoWindow hidden. I am prototyping this therefore I have very minimal code, here is the entire page:
Basically, what I'm trying to do is have the page load with just the button visible then when I click the button I would like the kendoWindow to open. After the page loads, if I close the kendoWindow and click the button, it opens but it's not centered. I am just getting a little frustrated, any help at all would be greatly appreciated.
Thanks!
-Sean
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ScratchPad.Default" %> <!DOCTYPE html> <html lang="en-us"> <head runat="server"> <meta charset="utf-8" /> <title></title> <link href="Content/kendo/kendo.common.min.css" rel="stylesheet" type="text/css" /> <link href="Content/kendo/kendo.metro.min.css" rel="stylesheet" type="text/css" /> <link href="Content/default.css" rel="stylesheet" type="text/css" /> <script src="Scripts/jquery-1.8.1.js" type="text/javascript"></script> <script src="Scripts/newKendo/kendo.web.min.js" type="text/javascript"></script> </head> <body> <form id="form1" runat="server"> <div> <asp:button id="btnOpenDiv" runat="server" text="Click Me!" /> </div> <div id="dlgWindow"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in tellus tincidunt leo consequat tempor. Quisque pellentesque magna vitae elit consectetur venenatis. Nam ornare tristique magna, sed feugiat felis pellentesque vestibulum. Donec et dui erat, non vehicula dui. Aenean tincidunt nisl nisi, at posuere eros. Proin aliquet adipiscing vestibulum. Aliquam aliquam leo non sem pulvinar cursus. In dolor tellus, volutpat id pharetra a, tristique non arcu. Maecenas ac est vitae nisi hendrerit dapibus. Phasellus varius, arcu a sodales adipiscing, nunc nisl tempus turpis, ut posuere eros dui eu purus. Sed diam elit, elementum in fermentum eget, fringilla a purus.</p> </div> </form> <script> $(document).ready(function() { var window = $("#dlgWindow"); var btn = $("#<%= btnOpenDiv.ClientID %>"); btn.bind("click", function() { window.data("kendoWindow").open(); }); window.kendoWindow( { width: "500px", height: "200px", center: "True", visible: "False" }); }); </script> </body> </html>
Basically, what I'm trying to do is have the page load with just the button visible then when I click the button I would like the kendoWindow to open. After the page loads, if I close the kendoWindow and click the button, it opens but it's not centered. I am just getting a little frustrated, any help at all would be greatly appreciated.
Thanks!
-Sean