Separate Java Script file not Called

5 posts, 0 answers
  1. Vinoth
    Vinoth avatar
    25 posts
    Member since:
    Aug 2012

    Posted 01 Feb 2012 Link to this post

    Hi Friends,

    Belated wishes Happy New 2012.

    In my project, I'm using RadTreeview. Earlier i have client side(Java Script) code within page itself. It works fine. But Now i move all codes to separate Java Script File it won't find Tree View. Please give me solution for this.  Because of Security Reason I move to  separate  file.


    Thanks 
    -- Vinoth

  2. RvdGrint
    RvdGrint avatar
    112 posts
    Member since:
    May 2011

    Posted 01 Feb 2012 Link to this post

    Use RadScriptManager to register your javascript files.
    This will solve the problem.

    Regards,
      Jos.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Feb 2012 Link to this post

    Hello Vinoth,

    Try referring the script in ScriptManager as shown below.
    aspx:
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
     <Scripts>
        <asp:ScriptReference Path="~/scripts/MyScript.js" />
     </Scripts>
    </
    telerik:RadScriptManager>

    -Shinu.
  5. Vinoth
    Vinoth avatar
    25 posts
    Member since:
    Aug 2012

    Posted 02 Feb 2012 Link to this post

    Hi Shinu,

    It is not working, now it self it says treeview was null.

    <telerik:RadScriptManager ID="RadScriptManager2" runat="server">
         <Scripts>
             <asp:ScriptReference Path="~/CourseBuilder/js/CourseBuilderJavaScript.js" />
         </Scripts>
     </telerik:RadScriptManager>


    thanks,
  6. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 06 Feb 2012 Link to this post

    Hello Vinoth,

    You can refer to the attached file for an example how you can use an external javascript file. 

    Kind regards,
    Kate
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017