• Register
0 votes
29 views

Problem :

I want to send a call using ajax but in Chrome getting following error

“Failed to load resource: the server responded with a status of 500 (internal server error)”

But for firefox getting no error. I also tried to record the ajax call in firebug but there is no call request in firebug May I know the solution for this issue?.

Index.chshtml code is as follows

function onLoad(e) {

    var grid = $(this).data("tGrid");

    //bind to the context menu of the Grid's header

    event.preventDefault();

    $(this).find(".t-grid-header").bind('contextmenu', function (e) {

        //wait for the menu to be generated

        setTimeout(function () {

            // bind to the checkboxes change event. The context menu has ID in the format "GridName" + "_contextmenu"

            $('#globalsearchgrid_contextMenu :checkbox').change(function () {

                debugger;

                var $checkbox = $(this);

                // the checked state will determine if the column has been shown or hidden

                var checked = $(this).is(":checked");

                // get the index and the corresponding column from the Grid's column collection

                var columnIndex = $(this).data("field");

                var request = "{'columnIndex':'" + columnIndex + "'value':'" + checked + "'}";

                $.ajax({

                    type: "POST",

                    url: "../../GlobalSearch/SaveColumnInfo",

                    data: request,

                    contentType: "application/json; charset=utf-8",

                    dataType: "json",

                    success: function (msg) { },

                    error: function (xhr, status, error) {

                        alert(error.responseTextss);

                    }

                });

            });

        });

    });

}

6.9k points

1 Answer

0 votes

Solution :

The 500 error code normally indicates that there is an error on the server, and there is nothing wrong with your code.

·         Please speak with the server development team to get more information on it.

·         Try to verify your argument values into the call. Also search for anything that you think can cause a problem to the server process. Ideally the process should not terminate and should return you a better response code.

·         May be intermittent like if the server database is down. You can try after some time.

36.1k points

Related questions

0 votes
1 answer 537 views
537 views
Problem : I am facing the below error: Failed to load resource: the server responded with a status of 401 (Unauthorized) http://localhost/App/AngularJS/angular.min.js My project works fine on the localhost. But when I try to run it on the IIS (7.5) I often face ... read/write/modify access for the "IUSR" & "IIS_ISURS" users of my whole project. But still I am facing the same exception on my IIS.
asked Dec 24, 2019 alecxe 7.5k points
0 votes
1 answer 166 views
166 views
Problem : I am unable to solve my link problem. Can anybody help on to this to link the CSS and JS File? I am facing below error : Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/ ... .js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.js
asked Jan 10 alecxe 7.5k points
0 votes
1 answer 26 views
26 views
Problem : I have got the legacy code issue that requires that I support the random urls as if they were requests for a home page. Some of the URLs have the characters in them that generate the below error "A potentially dangerous Request.Path value was detected from ... />     </system.web> <configuration> I have also Added a ValidateInput attribute to my action that should be catching the urls.
asked Jan 25 jwilliam 3.9k points
0 votes
1 answer 11 views
0 votes
1 answer 8 views