Failed to load resource the server responded with a status of 500 Internal Server Error in Bind function

0 votes

I wanted to send a call using Ajax. When I do it in Chrome it is rising an error but in Firefox there is no error.  I tried to record my call in Firebug but there is no call request in Firebug.

Index.chshtml code is below:

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);
                    }

                });
            });
        });
    });
}

Controller method.

 public JsonResult SaveColumnInfo(string columnIndex, string value)
    {
        CookieHelper helper=new CookieHelper();
        helper.UpdateCookie(int.Parse(columnIndex), value.ToString());

        return Json("Success");
    }

Error in Chrome.

POST http‍://localhost:3577/GlobalSearch/SaveColumnInfo 500 (Internal Server Error)
jQuery.ajaxTransport.send
jQuery.extend.ajax
(anonymous function)
jQuery.event.handle
jQuery.event.add.elemData.handle.eventHandle

Can someone help me with this error? 

Apr 28, 2022 in Other DevOps Questions by Kichu
• 19,040 points
12,361 views

1 answer to this question.

0 votes

The 500 code gets the error and that doesn't mean that your code has any problem. Even though this is the case you can do some things and they are:

  • Connect with the server developer for more info.
  • Verify your arguments in the call.
  • The process should not die and should return you a better code.

I hope this helps.

answered Apr 29, 2022 by narikkadan
• 63,600 points

Related Questions In Other DevOps Questions

0 votes
1 answer

Error “Failed to load the "vagrant-berkshelf" plugin.”

I found workround, set "NIO4R_PURE" environment variable. export ...READ MORE

answered Jul 25, 2018 in Other DevOps Questions by Kalgi
• 52,350 points
997 views
0 votes
0 answers
0 votes
1 answer

Capistrano deploy error saying "end of file reached" while deploying to Ubuntu server

Seems like Capistrano can't connect to the server ...READ MORE

answered Jul 3, 2018 in Other DevOps Questions by Kalgi
• 52,350 points
1,295 views
0 votes
0 answers

jQuery.click() vs onClick

I have a huge jQuery application, and ...READ MORE

Feb 8, 2022 in Java by Rahul
• 9,680 points
691 views
0 votes
1 answer

jQuery UI " $("#datepicker").datepicker is not a function"

I struggled with a similar problem for ...READ MORE

answered Feb 17, 2022 in Java by Soham
• 9,710 points
6,432 views
0 votes
1 answer

TypeError: $(...).DataTable is not a function

This happened because the jQuery DataTables library ...READ MORE

answered Apr 30, 2022 in Git & GitHub by narikkadan
• 63,600 points
14,156 views
0 votes
1 answer

jQuery UI " $("#datepicker").datepicker is not a function"

The "$(...).datepicker is not a function" jQuery ...READ MORE

answered Jun 6, 2022 in JQuery by Edureka
• 13,690 points
15,539 views
0 votes
1 answer

Can't bind to 'ngModel' since it isn't a known property of 'input'

Just add this in the app.module.ts file: import { FormsModule ...READ MORE

answered Apr 30, 2022 in Other DevOps Questions by narikkadan
• 63,600 points
4,491 views
0 votes
1 answer

Manifest Merger failed with multiple errors in Android Studio

Open application manifest (AndroidManifest.xml)  > Merged Manifest. ...READ MORE

answered Apr 29, 2022 in Other DevOps Questions by narikkadan
• 63,600 points
1,738 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP