This is a migrated thread and some comments may be shown as answers.

Do not open window when page loads

1 Answer 526 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 27 Jul 2012, 02:41 AM
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>

1 Answer, 1 is accepted

Sort by
1
Andrew
Top achievements
Rank 1
answered on 27 Jul 2012, 09:30 AM
Never mind.
I figured it out.

.Visible(false)
Tags
Window
Asked by
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Share this question
or