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
- Save Search System
- adjust section according to country?
- populate form fields in a loop with ajax
- dynamic dependent select dropdown
- WordPress, AJAX and pre_get_posts using conditional tags
- Are nonces in WP REST API optional by default?
- Change “add to cart” button color based on Woocommerce product category [closed]
- Ajax request returns ‘Array’. How to output the actual results?
- How to send Ajax request from my plugin in admin dashboard?
- Posting and image insertion problems after EasyApache4 and PHP 7 upgrade
- Post + form + action + results on the same page
- How to add a do_action on refreshing of WP customizer?
- contact form ajax empty response error message
- How to pre populate a form field with a link of a current user’s author profile?
- Why Won’t My Inputs in a form with a Get method work together?
- Refresh table data with Ajax
- How to pass Select value from Javascript to PHP to generate select option on change
- get_children displaying images removed from the page
- Input data from email form not going to JSON file
- How to get the value of input hidden html from text editor to custom page template?
- Setting value of session with Ajax not working
- AJAX success response is not working but it’s saving my changes
- how to make custom ajax handler?
- [jQuery]Adding shortcode
- Display parent and child taxonomies in separate drop down select fields
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Styling my own password protected page, how to deal with wrong password?
- Contact form won’t submit
- wp_mail file attachment not being placed in upload folder?
- Plugins not working on AJAX requests
- Search Query: how to construct a search string from two select elements?
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Getting error when using wp_insert_post()
- Fancybox type popup window that’s not an iframe
- Using Select HTML in Bootstrap Popovers
- How to disable controls in theme customizer?
- Error: options page not found
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- Databases – Submitting data from inputs to database [closed]
- how to update and display an option without reloading the page
- Headers already sent in Pluggable.php / homepage and wp-login error
- How to show a ‘correct’ message after submit a form?
- db converts decimal number wrong
- Form Security: nonce vs. jQuery
- How do I Import / Upload Files with jQuery AJAX?
- Which is the correct way to conditionally enqueue a CSS file?
- “Undefined index” error when saving empty array with checkboxes
- WordPress Ajax Call inserting data but success response false
- Loading php file with AJAX in WordPress frontend
- wp ajax return 0
- WordPress plugin: render only page content using ajax call
- AJAX – Returning Two JSON Objects with One PHP Function
- Pull GetOption() variable into jQuery dynamically created html
- Trying do build a contact form
- “operation successful” message
- Get the URL of the page from which an ajax request has been launched within ajax callback
- unable to use ‘new WP_Query’ in AJAX call
- User register hook is not working in woocomerce register form
- admin-ajax Firing Error 400 When Logged In
- Search WordPress using static html page
- AJAX button action in foreach
- is_user_logged_in() not working in AJAX validation call
- Unset session variable on page reload / setup but exclude AJAX
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress ajax-action failing because of newline in response
- Making an AJAX call to refresh a table
- HTML escaping data with ajax requests
- WordPress Ajax Always returning 0
- How to execute html code inside php?
- Using data sent via AJAX in multiple functions on a WP plugin
- Problem with AJAX in wordpress plugin
- load ajax using admin-ajax.php
- Preg_Match(): compilation failed unknown property name
- Ajax button not working
- Function won’t run onclick using Ajax
- Warning: Illegal string offset on theme options page [closed]
- customize wordpress database error page
- How to put a form with php code into a variable or shortcode?
- How to keep track of when a vote is cast?
- PHP if statement works in template files, but not header
- Can a page contain php code?
- WordPress plugin admin page – using WordPress function in linked php file