Maximum call stack size exceeded error

后端 未结 30 2604
独厮守ぢ
独厮守ぢ 2020-11-21 23:51

I am using a Direct Web Remoting (DWR) JavaScript library file and am getting an error only in Safari (desktop and iPad)

It says

Maximum call

30条回答
  •  遥遥无期
    2020-11-22 00:35

    We recently added a field to an admin site we are working on - contact_type... easy right? Well, if you call the select "type" and try to send that through a jquery ajax call it fails with this error buried deep in jquery.js Don't do this:

    $.ajax({
        dataType: "json",
        type: "POST",
        url: "/some_function.php",
        data: { contact_uid:contact_uid, type:type }
    });
    

    The problem is that type:type - I believe it is us naming the argument "type" - having a value variable named type isn't the problem. We changed this to:

    $.ajax({
        dataType: "json",
        type: "POST",
        url: "/some_function.php",
        data: { contact_uid:contact_uid, contact_type:type }
    });
    

    And rewrote some_function.php accordingly - problem solved.

提交回复
热议问题