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

pop up Window not opening

1 Answer 161 Views
Window
This is a migrated thread and some comments may be shown as answers.
Harsh
Top achievements
Rank 1
Harsh asked on 08 Apr 2013, 03:23 PM
Hi,

Below is my code to open a window which shows details of a tree node selected. The treeview is only in kendo while all other components are telerik.
 But the window does not come up, we get an error in the console as :
TypeError: $(...).data(...) is undefined$('body > #Window').data('kendoWindow').center().open();
What are we missing ?
.delegate(".details-icon", "click", function (e) {
        e.preventDefault();
        $("body > #Window > .t-window-titlebar > .t-window-title").text("Group Details"); // Change the header
        var groupId = $(this).closest(".k-item").find("input[type = checkbox]").val(); 
        var groupName = $(this).closest(".k-item").find(".k-in:first").justtext();
        var iconPath = $(this).closest(".k-item").find(".k-in:first").find(".k-image").attr("src");
        $("body > #Window > .k-content").css({ "width": "350px", "height": "150px" }).html("<div>Group Name : <strong style='color:#2A43B5;font-family:Georgia'>" + groupName + "</strong><br/><br/>Group Icon: <img style='vertical-align:middle;' src='" + iconPath + "'/> </div>");
        $('body > #Window').data('kendoWindow').center().open();
        return false;

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 08 Apr 2013, 04:16 PM
Hello,


I am not aware of the exact scenario, but generally speaking, the part of the provided code, which is related to the window is correct. As demonstrated in the following JS Bin demo, the window is opened and centered with the open() and center() methods of the Window API. 

I guess that the error is somewhere in the jQuery selectors before this line, so you could debug them to find out which one is causing the problem.

 

Regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
Harsh
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or