Solved. Works fine without dataType: json
in ajax-script.js
and header('Content-Type: application/json');
in php file
Related Posts:
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- Ajax form submit within a Post Metabox
- Ajax return code 400
- How to store data from multiple forms using ajax and php
- Ajax loaded form replaces form action with Ajax url
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- Ajax call return 404
- Show success or error messages in Ajax response to WordPress custom registration form
- WordPress admin-ajax.php 400 bad request
- Ajax contact form return 0
- javascript variable to wordpress php variable
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Custom HTML form using PHP – help with ajax/username validation
- Submitting my form to the database and then redirecting to payment site
- Ajax call URL 404’ing when pushed to staging server
- ajax form function error
- How to fix ‘Notice: Undefined index:’ in PHP form action
- Genesis – Customize search form
- WSOD but WP_DEBUG not giving any errors
- get_the_content if it contains multiple lines it results in SyntaxError
- PHP calling AJAX function that relies on passed PHP function values not working
- Looking for a better way to handle an ajax script that pulls in post data on click
- How to resolve error “Cookies are blocked due to unexpected output.”?
- How to add default images into theme customizer image control?
- Enable errors PHP WordPress 5.2
- Can’t use get_results() in ajax query
- Debugging PHP object during Ajax call in WordPress
- WordPress Ajax Data problem
- Access/update database with jQuery
- Passing jQuery value using Ajax to a page template
- ajax_object is not defined when ajax calls the function
- Page Reloads Before AJAX Request Finishes
- Why is this Ajax not working?
- How to make drop down post title
- Custom Form Processing Issue
- ajax, right way to do it and make it works?
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- WordPress ajax doesn’t display object method on jQuery .change() function
- Problem with custom plugin using AJAX to pull info from php file
- Call a PHP Function with Multiple Parameters that is outside the AJAX Handler
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- WordPress, AJAX and pre_get_posts using conditional tags
- Input data from email form not going to JSON file
- Setting value of session with Ajax not working
- db converts decimal number wrong
- AJAX – Returning Two JSON Objects with One PHP Function
- unable to use ‘new WP_Query’ in AJAX call
- admin-ajax Firing Error 400 When Logged In
- is_user_logged_in() not working in AJAX validation call
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress Ajax Always returning 0
- Woocommerce with Lazy Load php and ajax
- Can I make get_users() query global?
- Shortcode to embed Edit Account form not working
- Errors after upgrading PHP to 7.4 WordPress
- Capture form data in one function and use it in another function (same file)
- My jQuery Ajax form submit is still refreshing page?
- What’s wrong with this piece of code? [closed]
- WPDB secure custom form
- WordPressUser Submission Form
- calling admin-ajax.php from admin-ajax.php
- How can I fix this code [duplicate]
- Too many errors on log
- Cascading dropdown select search based on Parent Page & Child Page
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- jquery & ajax getting data from php in wordpress . admin-ajax.php returns 400
- Settings API form – submit with AJAX
- PHP Warning: mysqli_query(): after updating my websites php from 5.6 to 7.2
- PHP multiple forms, same page, isset($_POST[]) not working?
- register_block_type is not working properly
- Submit remote form to wordpress REST API and save data to custom post type
- Implement jQuery Smart wizard
- AJAX numerical pagination problem in TwentyFifteen-child theme
- Filtering custom posts by using checkboxes for taxonomy in an ajax loop always gives server 500 error
- Why my Ajax events are no longer detected after dynamic change of shortcode content
- Contactform7: display results from CURL
- How do I stop my form from adding code to current page URL instead of re-directing. Been stuck for days
- Getting an empty space in up sell items
- ajax polling with admin-ajax.php
- If input field has value Require another field – PHP
- A javascript function that simply runs a php function on the plugin
- WordPress 404 when using AJAX to call php function
- how use php query in AJAX jquery
- global $post inside plugin query messes up every new post page in wp-admin
- wp_delete_comment is doing nothing
- Post from front end form to post_meta
- Pass the updated value of aid from form using ajax
- Functions are causing errors
- Execute PHP code in Javascript onclick
- best way to communicate between php and jquery/javascript
- upload images on front by user using form
- Parse error: syntax error, unexpected ‘}’ in C:\wamp64\www\Proiect\aplicatie\user_check.php on line 18 [closed]
- PHP warning Invalid argument supplied for foreach() on custom page template
- Not able to see the error [closed]
- how to display tables via ajax
- Redirect loop upon installation of my plugin
- Use of undefined constant issue
- Can’t insert into a database wordpress