Do not open window when page loads

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    171 posts
    Member since:
    Jun 2009

    Posted 26 Jul 2012 Link to this post

    How can i stop the window from opening on page load.
    All the examples open the window straight away.
    I would like to only open it when the user clicks a button on the page.

    here is my code:

    <div class="CintTxtBlockWide">
            <span id="openEmail" class="CintSlide"><img src="../../Images/email.jpg" />Keep yours email in the cloud</span>
            <span id="openBox" class="CintSlide"><img src="../../Images/file.jpg" />Your Files in the cloud</span>
            <span id="openDesk" class="CintSlide"><img src="../../Images/desktop.jpg" />Your Desktop in the cloud</span>
            @(Html.Kendo().Window()
                .Name("window")
                .Content(@<text>
                    <p>
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris venenatis, sem sed semper fermentum, leo magna egestas felis, eu dictum nunc nisi eget massa. Nulla diam felis, condimentum sed commodo a, rutrum at metus. Vestibulum consequat volutpat dapibus. Pellentesque vitae sollicitudin nulla. Suspendisse sapien lectus, convallis at vestibulum non, semper sed odio. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris mauris diam, dictum vitae vestibulum non, iaculis id nisi.
                    </p>
                    <span id="closeWindow">Close</span>
                </text>)
                .Width(420)
                .Height(440)
            )
        </div>
     
    <script>
        $(document).ready(function () {
            var desk = $("#window");
     
            $("#openEmail").click(function (e) {
                desk.data("kendoWindow").open();           
            });
            $("#openBox").click(function (e) {
                desk.data("kendoWindow").open();
            });
            $("#openDesk").click(function (e) {
                desk.data("kendoWindow").open();
            });
             
            $("#closeWindow").click(function (e) {
                desk.data("kendoWindow").close();
            });
     
        });
    </script>
  2. Andrew
    Andrew avatar
    171 posts
    Member since:
    Jun 2009

    Posted 27 Jul 2012 Link to this post

    Never mind.
    I figured it out.

    .Visible(false)
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top