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 in Other DevOps Questions by Kichu
• 16,850 points
234 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

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
311 views
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
508 views
+2 votes
1 answer

Error: Reference to undeclared resource in terraform code

Check the vpc declaration in subnets, internet ...READ MORE

answered Nov 17, 2019 in Other DevOps Questions by ahmed
18,813 views
0 votes
1 answer

Is it possible to have a link to raw content of file in Azure DevOps

Sure, here's the call for the rests: GET ...READ MORE

answered Feb 10 in Other DevOps Questions by Bhavitha
• 980 points
56 views
0 votes
0 answers

jQuery.click() vs onClick

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

Feb 8 in Java by Rahul
• 8,980 points
17 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 in Java by Soham
• 8,730 points
505 views
0 votes
0 answers

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

I am working on jQuery's Datatable JS ...READ MORE

Apr 29 in Git & GitHub by Kichu
• 16,850 points
62 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,510 points
284 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP