This is a migrated thread and some comments may be shown as answers.

AjaxManager, Firefox gives -TypeError: access to strict mode..

1 Answer 135 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 28 Sep 2018, 06:28 AM

Running 2018.3.910

request, 

function RefreshGrid() {
    $find("ctl00_cphMain_RadAjaxManager1").ajaxRequest("Rebind");
    getClientCart();
}

 

Manager,

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
      <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="grCart" />
            </UpdatedControls>
         </telerik:AjaxSetting>
         <telerik:AjaxSetting AjaxControlID="grCart">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="grCart" />
            </UpdatedControls>
         </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="lvDelMethods" />
            </UpdatedControls>
         </telerik:AjaxSetting>
      </AjaxSettings>
    </telerik:RadAjaxManager>

 

server side,

protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        if (e.Argument == "Rebind")
        {
            grCart.Rebind();
            lvDelMethods.Rebind();
        }
    }

 

Error in Firefox - works just fine in Chrome, Edge and IE.

TypeError: access to strict mode caller function is censored

_doPostBack http://localhost/Telerik.Web.UI.WebResource.axd:15:13769Function.createDelegate/< http://localhost/Telerik.Web.UI.WebResource.axd:6:305__doPostBack http://localhost/Telerik.Web.UI.WebResource.axd:30710:1__doPostBack http://localhost/Telerik.Web.UI.WebResource.axd:30710:1__doPostBack http://localhost/Telerik.Web.UI.WebResource.axd:30710:1ajaxRequest http://localhost/Telerik.Web.UI.WebResource.axd:1930:27RefreshGrid http://localhost/Scripts/cart.js:129:5<anonymous> http://localhost/Scripts/cart.js:117:9dispatch http://localhost/Scripts/plugins/jquery-3.3.1.min.js:2:41720add/y.handle http://localhost/Scripts/plugins/jquery-3.3.1.min.js:2:39774

 

Seems to be working if the request comes from the grid itself but not from the ajaxmanager request.

Any idea what causes this?

 

Christian

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 01 Oct 2018, 04:58 PM
Hello Christian,

Judging from the stack trace, the problem origin is jQuery 3.3.1 which breaks the __doPostBack method from the MS AJAX framework. We encountered the same problem when we upgraded the jQuery we bring in R2 2018 and this is why we returned to 1.x. You can read more about this here: https://www.telerik.com/forums/known-issues-and-important-changes#KKI7NGE4P0K-jwQGL525dA.

I'm afraid that there are no known solutions for this (apart from the obvious jQuery downgrade), as it is a problem between how the MS AJAX framework is implemented and 'use strict' that jQuery 3 begins with. Perhaps you could remove the strict mode from the jQuery you use, but if you upgrade jQuery the issue may rear up again. Also, if some other script puts the page in strict mode, you'd get the same error again.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Ajax
Asked by
Christian
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or