+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Telerik is not defined

Telerik is not defined

9 posts, 0 answered
  1. Henrik
    Henrik avatar
    20 posts
    Registered:
    10 Jun 2010
    08 Jul 2010
    Link to this post
    1.<script type="text/javascript">
    2.//<![CDATA[
    3. Sys.Application.add_init(function(){$create(Telerik.Web.UI.RadMenu, {"_childListElementCssClass":null,"clientStateFieldID":"ctl00_main_menu_main_menu_mainMenu_ClientState","collapseAnimation":"{\"duration\":450}","enableOverlay":false,"enableScreenBoundaryDetection":false,"enableSelection":false,"expandAnimation":"{\"duration\":450}","expandDelay":0,"itemData":[{ cut }]}, null, null, $get("ctl00_main_menu_main_menu_mainMenu"));});
    4.//]]>
    5.</script>

    Comes up when I disable all javascript-things in the menu advanced settings as this site doesn't require them.

    How can I solve this while not letting the menu add any javascript to the page?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    08 Jul 2010
    Link to this post
    Hello Henrik,

    You cannot disable the embedded resource completely. Our controls are AJAX based and they require built-in script libraries. Setting EnableEmbeddedScripts property to false should stop loading the embedded resources, but you have  to add a script reference for each JavaScript file through the ScriptManager or RadScriptManager.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Henrik
    Henrik avatar
    20 posts
    Registered:
    10 Jun 2010
    09 Jul 2010
    Link to this post
    XmlHttpRequest is for loading data from the server. I want my menu to be rendered in full to the html like it is for the current page. This is why I disable scripts (and to reduce loading time as you are not compressing output [can be compressed on average 60% from what the CMS does]).

    How do I disable scripts then?

    And also, there are no asynchronous requests when browsing with jQuery anyway, so what would the control need javascript for?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Jul 2010
    Link to this post
    Hello Henrik,

    You can place the control in a user or custom control. Then in PageLoad you can check whether  you are in edit mode or not. If you are in edit mode enable RadMenu scripts, otherwise they will be disabled

    if (HttpContext.Current.Request.QueryString[ "cmspagemode" ] == "edit" )
        {
           //here disable RadMenu scripts
        }


    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Henrik
    Henrik avatar
    20 posts
    Registered:
    10 Jun 2010
    09 Jul 2010
    Link to this post
    Hello Ivan,

    You must have confused my two threads. The "Telerik is not ..."-bug is when rendered. It stems from the fact that I disable the scripts which you now tell me to disable.

    Please read my last post again.

    Henrik
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Jul 2010
    Link to this post
    Hello Henrik,

    As written before you cannot disable completely the scripts. Here is a link to a posts RadMenu for ASP.NET Ajax - Working with disabled JavaScript that explains how you can work with RadMenu and disabled scripts. You need to add some custom scripts or css classes that will allow you to use some of the basic features of the control. This is AJAX control.
    Another option is creating a custom control that do not use any js and AJAX

    All the best,
    Ivan Dimitrov
    the Telerik team
     
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
     
  7. Henrik
    Henrik avatar
    20 posts
    Registered:
    10 Jun 2010
    09 Jul 2010
    Link to this post
    Hi!

    What does it use AJAX for?

    Henrik
  8. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    20 Aug 2010
    Link to this post
    How can I disable Radmenu scripts and other un wanted scripts as my page size is very high because of these java scripts after compression enabled and disabled view state as well. I am using iis 7 so http compression will also be enabled.
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    20 Aug 2010
    Link to this post
    Hi Venkat,

    Take a look at Optimize your website performace. You can use CDN support.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
9 posts, 0 answered