JQuery Ajax Post results in 500 Internal Server Erro

0 votes

I am trying to perform this AJAX post but for some reason I am getting a server 500 error. I can see it hit break points in the controller. So the problem seems to be on the callback. Anyone?

$.ajax({
    type: "POST",
    url: "InlineNotes/Note.ashx?id=" + noteid,
    data: "{}",
    dataType: "json",

    success: function(data) {
        alert(data[1]);
    },
    error: function(data){
        alert("fail");
    }
});

This is the string that should be returned:

{status:'200', text: 'Something'}

Jun 23 in Web Development by gaurav
• 22,040 points
5,445 views

1 answer to this question.

0 votes

The 500 Internal Server Error is a very general HTTP status code. It means something has gone wrong on the website and webserver is unable to specify what exactly, thus failing in fulfilling the request made by the client.

How to Fix the 500 Internal Server Error

  1. Reload the web page.
  2. Clear your browser's cache.
  3. Delete your browser's cookies.
  4. Troubleshoot as a 504 Gateway Timeout error instead.
  5. Contacting the website is another option. 
  6. Come back later.
answered Jun 23 by rajatha
• 7,480 points

Related Questions In Web Development

0 votes
0 answers

JQuery $.ajax() post - data in a java servlet

I want to send data to a ...READ MORE

Jun 29 in Web Development by gaurav
• 22,040 points
693 views
0 votes
1 answer

How to download a file by jQuery.Ajax?

Hello @kartik, You don't need to do this ...READ MORE

answered Sep 18, 2020 in Web Development by Niroj
• 82,800 points
5,911 views
0 votes
1 answer

Get checkbox value in jQuery

if you have set a class or id for it, you ...READ MORE

answered Jun 23 in Web Development by rajatha
• 7,480 points
81 views
0 votes
1 answer

explode string in jquery

Use the JavaScript split() method If you want ...READ MORE

answered Jun 23 in Web Development by rajatha
• 7,480 points
241 views
0 votes
1 answer

jQuery AJAX submit form

There is a simple input mentioned below ...READ MORE

answered Feb 8 in Java by Soham
• 9,670 points
549 views
0 votes
0 answers

How can I upload files asynchronously with jQuery?

I would like to upload a file ...READ MORE

Jun 10 in JQuery by gaurav
• 22,040 points
132 views
0 votes
1 answer

Abort Ajax requests using jQuery

Instead of aborting, you can choose to ...READ MORE

answered Jun 16 in JQuery by rajatha
• 7,480 points
85 views
0 votes
0 answers

Fetch data from database in php through AJAX,

The index.php  I created a connection with the ...READ MORE

Jun 16 in PHP by narikkadan
• 37,660 points
2,194 views
0 votes
1 answer

Loading gif in jQuery ajax call is not showing

Create a div with your image. Make it ...READ MORE

answered Jun 27 in Web Development by rajatha
• 7,480 points
481 views
0 votes
1 answer

Get checkbox value in jQuery

To get the value of the Value ...READ MORE

answered Jun 23 in Web Development by rajatha
• 7,480 points
61 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