Problem with finding open window (duplicate dom elements?)

2 posts, 0 answers
  1. LARRY
    LARRY avatar
    3 posts
    Member since:
    Mar 2012

    Posted 09 Dec 2013 Link to this post

    I am declaring a window like this...

    in my html
    <div id='mywin'></div>

    in my js file...
            var window = $('#mywin');
            if (!"kendoWindow")) {
                    width: winWidth + "px",
                    height: winHeight + "px",
                    minWidth: winWidth + "px",
                    minHeight: winHeight + "px",
                    title: "Place of Interest Search",
                    actions: ["Close"],
                    resizable: false

            //open identify window

    this all works but when i attempt to reload content by...

        if ($("#mywin").data("kendoWindow")) {

            ..reload logic here

    this ("#mywin").data("kendoWindow") always returns false thus recreating the window every time.

    I notice in the dom there is the original div and then a duplicate div for the window at the bottom of the dom with the same id (mywin)

    what am i doing wrong here? I want to reuse the original window without having to destroy it and recreate it.
  2. Daniel
    Daniel avatar
    2177 posts

    Posted 11 Dec 2013 Link to this post


    I am not sure what could be causing another element with the same ID to be inserted in the DOM and I could not reproduce it on my side. Could you check this jsFiddle and let me know if I am missing something? Also, verify that you are not loading jQuery again. The widget instance will not be found in the element data if jQuery is loaded again after creating the window.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top