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

[Solved] $.telerik.window' is null or not an object

2 Answers 161 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Love
Top achievements
Rank 1
Love asked on 23 Feb 2011, 08:42 PM
I am trying to create Telerik Window using Client side API inside jQuery.

I have included required telerik .js files too.

<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="../../Scripts/2010.3.1318/telerik.common.min.js" type="text/javascript"></script>
<script src="../../Scripts/2010.3.1318/telerik.window.min.js" type="text/javascript"></script>

I have loaded script file in correct order. All these script file are in Master page (i.e. _Layout.cshtml as I am using MVC Razor syntax).
I am creating telerik window in content page, However I still get $.telerik.window' is null or not an object error in browser. I don't know how to resolve this !!!!

What I noticed is If I use Server side API and Creat Window, and Set Visible = false, then open it in my javascript it works. I don't know what is wrong with Client Side API?

2 Answers, 1 is accepted

Sort by
0
Love
Top achievements
Rank 1
answered on 24 Feb 2011, 04:29 PM
I can't last message posted by Telerik admin. No one knows what is the problem and how to resolve it.
0
Love
Top achievements
Rank 1
answered on 25 Feb 2011, 04:25 AM

I resolved my issue. Since I am trying to create and display Telerik window inside jQuery

telerik.draganddrop-min.js and telerik.window-min.js is not getting loaded. If I try to add them manually in master page, they get added before all other scripts.

I found solution:
Add those ".js" files manually in master page as follows:

This line goes 
@Html.Telerik.ScriptRegistrar().Scripts(s => s.Add("/2010.3.1318/telerik.draganddrop.min.js").Add("/2010.3.1318/telerik.window.min.js"))
 </body>
</html>

It is also mentioned in following telerik link. It was very tedious task to search.

I also read that this was the issue in the earlier Telerik release. I am using Telerik 2010.3.1318 build and I still see the issue. Hope telerik resolves this issue.

Tags
Window
Asked by
Love
Top achievements
Rank 1
Answers by
Love
Top achievements
Rank 1
Share this question
or