TypeError: k.replace is not a function Source File:

2 posts, 0 answers
  1. Bylar
    Bylar avatar
    8 posts
    Member since:
    Jul 2012

    Posted 26 Aug 2013 Link to this post


    I am using the code
     window.radopen(encodeURI('<%=ResolveUrl("~/")%>UI/Query.aspx?txtToFill=' + hdnSearchText + "&Name=" + document.getElementById(hdnName1).value + "&btnUploadFile=" + btnQuery), 'NavigationWindow');

    to open a window as a rad window popup. Inside this window we have added a custom close button to close the window.
                function getRadWindow() {
                    var oWindow = null;
                    if (window.radWindow) oWindow = window.radWindow;
                    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                    return oWindow;
                function closeWindow() {

    But I am getting an error :

    Timestamp: 8/26/2013 5:48:47 PM
    Error: TypeError: k.replace is not a function
    Source File: http://localhost:1981/Telerik.Web.UI.WebResource.axd?

    Line: 5545

    I don't know what is wrong in this case.
    Thanks in Advance.

  2. Marin Bratanov
    Marin Bratanov avatar
    5326 posts

    Posted 27 Aug 2013 Link to this post

    Hi Bylar,

    I see that the scripts are loaded from the AjaxControlToolkit assembly (it is present in the path to the combined scripts). This is not a known issue with RadWindow, so at this point I can suggest the following:
    - try replacing the RadScriptManager with the asp ScriptManager or the toolkit's script manager to see if this makes a difference
    - since it will, most likely, have no effect, try removing the AjaxControlToolkit assembly from the project (even deleting the file) because it is known to change some of the MS AJAX scripts which can break something that relies on them, like our controls

     Other things you can try are:
    - using the latest AjaxControlToolkit assembly to see if this helps
    - attempting to force the correct AJAX scripts by following this thread or simply referencing the MS AJAX scripts from their CDN through URLs.

    Marin Bratanov
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top