This question is locked. New answers and comments are not allowed.
I am attempting to add a script for my view by declaring a second ScriptRegistrar in the view. The view uses a layout on which the Default ScriptRegistrar resides. Here is excerpts from the rendered page:
<head> (head stuff here)<script type="text/javascript" src="/Myapp/asset.axd?id=aQMAAB-..."></script><script type="text/javascript" src="/Myapp/Scripts/Shared/Manual.js"></script><script type="text/javascript">//<![CDATA[jQuery(document).ready(function(){jQuery('#Dropdownlist').tDropDownList({onChange:Dropdownlist_onChange, data:[{"Text":"","Value":"0"},...]});//]]></script> <script type="text/javascript" src="/Myapp/Scripts/jquery.cookie.js"></script> <script type="text/javascript" src="/Myapp/Scripts/jquery.validate.js"></script></head><body>...The error is occurring on the line that begins "jQuery('#Dropdownlist'). The error is:
"Object doesn't support property or method 'Dropdownlist_onChange'
It appears that the named function Dropdownlist_onChange in my "Manual.js" is not being loaded into the DOM.
Right now I have located the following:
@(Html.Telerik().ScriptRegistrar()
.Scripts(x => x.AddGroup("Manual", group => group
.Add("~/Scripts/Shared/Manual.js"))))
near the top of the view, before the dropdownlist. Why am I getting the error?