This is a migrated thread and some comments may be shown as answers.
$.telerik is null when accessing via js
1 Answer 39 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Craig
Top achievements
Rank 1
Craig asked on 21 Dec 2010, 04:29 AM
I grabbed this snipplet from the telerik site.  I can't figure out why it's not working.  

It keeps saying $.telerik is null.


var windowElement = $.telerik.window.create({
    title: "Insert image",
    html: "<strong>Inserting an image...</strong>",
    contentUrl: '',
    modal: true,
    resizable: false,
    draggable: true,
    onClose: function() {}
});


I've included the following files and i see they are all there and being loaded.
<script src="../../Scripts/2010.3.1110/jquery-1.4.3.min.js" type="text/javascript"></script> <script src="../../Scripts/2010.3.1110/jquery.validate.min.js" type="text/javascript"></script> <script src="../../Scripts/2010.3.1110/telerik.common.min.js" type="text/javascript"></script> <script src="../../Scripts/2010.3.1110/telerik.draganddrop.min.js" type="text/javascript"></script> <script src="../../Scripts/2010.3.1110/telerik.window.min.js" type="text/javascript"></script> I've even tried forcing everything on the site master.
<% = Html.Telerik().ScriptRegistrar().Scripts(scripts => scripts.AddGroup("SharedScripts", scriptGroup =>
                    scriptGroup
<% = Html.Telerik().ScriptRegistrar().Scripts(scripts => scripts.AddGroup("SharedScripts", scriptGroup => scriptGroup .Add("telerik.common.min.js") .Add("telerik.calendar.min.js") .Add("telerik.timepicker.min.js") .Add("telerik.datepicker.min.js") .Add("telerik.window.min.js") .Combined(true) .Compress(true) .CacheDurationInDays(0) ) ) %> Nothing seems to work.


<% = Html.Telerik().ScriptRegistrar().Scripts(scripts => scripts.AddGroup("SharedScripts", scriptGroup =>
                    scriptGroup
                    .Add("telerik.common.min.js")
                    .Add("telerik.calendar.min.js")
                    .Add("telerik.timepicker.min.js")
                    .Add("telerik.datepicker.min.js")
                    .Add("telerik.window.min.js")
                    .Combined(true)
                    .Compress(true)
                    .CacheDurationInDays(0)
                    )
               )
                %>

1 Answer, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 1
answered on 16 Jul 2011, 08:23 PM
I know this is old, but I had a similar issue and I added a popup to the HTML via Razor, then hid that Razor Window, and was able to create a javascript window.  When I take out the un-needed Razor window, I get the same JS error.  Weird, but it works.
Tags
Window
Asked by
Craig
Top achievements
Rank 1
Answers by
Matt
Top achievements
Rank 1
Share this question
or