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.
Related Posts:
- JSON parsing error syntax error unexpected end of input
- jQuery Ajax error handling, show custom exception messages
- My javascript is returning this error: $.ajax is not a function
- Ajax TypeError: $.POST is not a function
- XML Parsing Error: not well-formed in FireFox but good in Chrome
- How to fix the ‘Missing required request header. Must specify one of: origin,x-requested-with’ Ajax Error
- What’s the point of the X-Requested-With header?
- How to get a cross-origin resource sharing (CORS) post request working
- jQuery – Illegal invocation
- ajax stopped working when not logged in?
- Using jQuery to delete data stored in wp_options
- AJAX nonce with check_ajax_referer()
- wp_mail script with jQuery post
- Ajax call does not activate callback function
- AJAX call returns 0
- jQuery and AJAX Not working with Select Form Element
- How to pass both action and formdata in wordpress ajax?
- jquery & ajax getting data to php in wordpress
- AJAX returns response 0
- jQuery AJAX form validation
- Basic WordPress AJAX Call
- AJAX post into pop-up div
- Bind to WPSetAsThumbnail
- Appending anchor tag to next post
- Registration e-mail check with AJAX
- Cannot access elements of json object
- Basic ajax call in WordPress
- Updating User Profile with AJAX not working
- Auto Load New Posts
- wp_ajax() question.. not using wp_enqueue_script?
- wp_ajax unauthenticated and authenticated
- Showing Author Information and Latest Post by author in lightbox when clicked on the name of the author
- WordPress ajax function parameter value not being passed
- Accept AJAX call with serialized form data
- Is there a restriction in WP on the use of jQuery load function?
- Ajax not posting form data to query in PHP function
- Front-end Ajax File Upload
- Display data on same page as form without refresh
- gravity forms jQuery.load into modal [closed]
- Ajaxify calendar
- Error when posting comment form: The error is TypeError: e[h] is not a function
- jQuery ajax call throws an HTTP 302
- Ajax, Permalinks and post_thumbnail
- WooCommerce Ajax Cart Update Stopped Working
- WordPress AJAX Load More function duplicating a post
- Advanced Ajax Page Loader (AAPL) blocks resources
- First Attempt at AJAX and it keeps getting Canceled. Can’t Get Results to Show
- Passing a varible from jQuery to PHP
- videopress videos are not displayed when loading the content with ajax in a lightbox
- Retrieve post info within AJAX helper function
- How to return multiple arguments from AJAX callback function
- Display posts from another site using REST API in an asynchronous manner
- Why use admin-ajax.php when loading pages through AJAX?
- WP Rest Api / Ajax POST not working when not logged in
- Why does my jQuery AJAX return 0?
- Simplest ajax form not working when it should
- Ajax Validation for reCaptcha
- Sorting WP Auctions by date/price?
- Loading dynamic content with AJAX breaking jQuery
- why is my wordpress Jquery-Ajax call not working?
- How to retrieve WP_Object that is inside an array of another array
- fill form fields with ajax response
- Adding custom cart price with Ajax in wordpress
- Can’t add classes using jQuery from a JSON string with get_body_class()
- Ajax call through admin-ajax.php returns 404 error
- WordPress Insert not working with ajax
- WP AJAX API with JS file
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Using Jquery submit with ajax request
- Why is ajax working on one server and not the next?
- Is there some jQuery conflict here?
- How to use wp_update_post with ajax on frontend
- Getting jQuery AJAX to work in WordPress (getting -1)
- Converting a working AJAX form to work with WordPress
- Connect Agile Carousel to WordPress AJAX
- Ajax page load in wordpress the right way?
- Which hook to use when adding ajax to viewer-facing side?
- jQuery forms & updating info
- Orderby post__in Not Working Correctly?
- wordpress ajax upload media not working
- Reload selected post in multiple post query with ajax
- jQuery.post() calling function with parameter
- $_POST empty in using new php file added to theme
- Passing variable data from external jQuery file to options.php
- Possibility of creating a folder in the wordpress root install and installing a file there, all via plugin?
- Displaying contents of a tab
- owl carousel not working after ajax load [duplicate]
- Load more button
- Ajax autocomplete based on usercode
- Variable not being returned from Ajax Javascript (though javascript receives it)
- jQuery AJAX add json2 dependency?
- How to respond with WP_Ajax_Response();
- How to pass more information though separate post keys via AJAX
- Convert WordPress SACK code to new admin-ajax
- Get selected value with PHP and jQuery
- Ajax Query returns zero
- Dynamically populate Cascading Dropdown from MySQL using JQuery/AJAX [closed]
- How to combine jQuery in-place editor with $wpdb->update
- Load loop images on click / defer image loading until click or other event
- Contact Form 7 – Submit Form not working After Ajax Request [closed]