jQuery ajax error function

0 votes

I have an ajax call passing data to a page which then returns a value.

I have retrieved the successful call from the page but i have coded it so that it raises an error in the asp. How do i retrieve that error from the jquery?

For example:

cache: false,
url: "addInterview_Code.asp",
type: "POST",
datatype: "text",
data: strData,
success: function (html) {
    alert('successful : ' + html);
    $("#result").html("Successful");
},
error: function (error) {
    **alert('error; ' + eval(error));**
}

It's the error bit that I don't understand. In the function what parameter do I need to put, so that I can then use the error message that I raised in the server.

Jun 29 in Web Development by gaurav
• 17,000 points
20 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 Web Development

0 votes
1 answer

jQuery Ajax throws error while using JSON Parse for Wikipedia API

<!Doctype html> <html> <head> ...READ MORE

answered 6 days ago in Web Development by rajatha
• 7,040 points
7 views
0 votes
1 answer

jquery - is not a function error

In Wordpress jQuery.noConflict() is called on the jQuery file ...READ MORE

answered 4 days ago in Web Development by rajatha
• 7,040 points
6 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,740 points
5,588 views
0 votes
1 answer

JQuery Ajax Post results in 500 Internal Server Erro

The 500 Internal Server Error is a ...READ MORE

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

jQuery $(this) selector function and limitations

this isn't a jQuery "thing", but a basic JavaScript ...READ MORE

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

Using Jquery Ajax to retrieve data from Mysql

Perform a AJAX GET request to get ...READ MORE

answered Jun 23 in Web Development by rajatha
• 7,040 points
34 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,740 points
238 views
0 votes
1 answer

TypeError: $.ajax(...) is not a function?

Please double-check if you're using the full-version ...READ MORE

answered Feb 22 in Others by Aditya
• 7,300 points
443 views
0 votes
1 answer

jQuery Ajax error handling, show custom exception messages

Make sure you're setting Response.StatusCode to something other than ...READ MORE

answered Jun 2 in JQuery by Edureka
• 13,640 points
133 views
0 votes
0 answers

Edit PHP query code depending on image map clicked area using AJAX

I am working on an image map ...READ MORE

Jun 3 in PHP by Kichu
• 19,040 points
22 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