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
• 13,460 points
6 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
• 4,940 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

1 day ago in Web Development by gaurav
• 13,460 points
4 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,720 points
5,416 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
• 4,940 points
6 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
• 4,940 points
6 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
• 8,730 points
166 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
• 13,460 points
15 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
• 4,940 points
16 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
• 10,840 points
18 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 3 days ago in Web Development by rajatha
• 4,940 points
3 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
• 4,940 points
7 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