in your html add
`<input name="action" type="hidden" value="test_function"/>`
here “value” is your “action_name”. Your ajax call is incorect. Data should be
url: "your php action script"
data: $(html data).serialize(),
About ajax first try to create ajax on your computer without wordpress. When you understand how ajax work try on WordPress.
Related Posts:
- How to use `foreach()` in ajax call
- ajax live search for post title
- Replacing select2 in admin backend for all selects
- How can I rename the WordPress AJAX URL? [duplicate]
- Display a function using AJAX
- Unable to get_the_content(); of a post in WordPress via AJAX
- Ajaxing function in widget class
- woocommerce target button with class after ajax update
- WP Ajax Function Always Returning undefined
- Scripts not appending to element in AJAX call – why?
- How to search using ajax for exact phrase or words in an input field?
- echo custom fields with AJAX
- Are innerHTML elements visible to jQuery functions?
- get content from page through AJAX
- Get URLs for AJAX Filter Checkboxes WordPress
- Woocommerce Variable Product Dropdown for Custom Shop Template
- Populate Product Regular Price with a calculated ACF Field Value
- Ajax Form Issues using Lightsail (AWS)
- post value to function with Ajax and jQuery
- Multiple Notifications SetInterval
- WordPress Ajaxifying not working properly
- Load scripts into an AJAX div
- Load scripts into an AJAX div
- admin-ajax.php & my wp-admin folder url showing in header
- Automatic add space if user enters number(any digit)
- Ajax call does not work for this custom code
- AJAX values converted to PHP Variables?
- iOS and ajaxComplete
- Ajax call always returns 0
- TinyMCE custom styles remove class when switching styles
- Show modified time if post is actually modified
- wp-admin page is blank
- How to fix a theme with page.php Default Template that accidentally deleted?
- Display random text from a file with the WP built-in AJAX API
- Using email_exists() wp function in an ajax request
- WordPress – thumbnail image from youtube (function and loop)
- Most efficient way to get custom database records from 20 buttons and 20 tables?
- How to Use JSON With AJAX?
- How to add a column to the Trash page?
- Creating loop within functions.php
- The correct way to call posts with ajax
- How to use max and min values of custom fields
- jQuery Plugin to use WordPress functions in AJAX request
- jquery won’t load in footer
- Woocommerce checkout field maxlength, make input number field only (postcode)
- ‘is’ functions and ‘get_query_var’ not working
- Replace menu links with # and add name to its li
- Ajax not working properly
- Wp_query function to search from product_title ‘OR’ product tags name
- Allow Post Author to be 0 on Update
- Trouble with adding a wp_enqueue_script on wordpress
- Create a new query in function.php to filter blog posts
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- Search filter by Post title OR Meta Title Value [duplicate]
- dynamic dependent select dropdown
- admin-ajax.php + load-scripts.php hanging for minutes
- Creating A New Admin Menu Tab For Theme Options
- How to disable controls in theme customizer?
- wp-admin won’t load after setting wp-login custom url
- Change CSS for logged in users
- Always the Latest google jQuery instead of default WordPress jQuery
- Add a jQuery Function
- Why doesn’t is_page(id) work in functions.php?
- jQuery does not work
- Where do i create my own function in wp-admin
- Enqueuing latest version of jQuery into a child theme returns a blank screen
- Dequeue script to prevent javascript event conflict on wordpress child theme
- While loop with an exception after a count is reached
- Function won’t run onclick using Ajax
- How do I pull excerpts from pages?
- Output loop to function return?
- Check if a value exists in database table
- Where is this JQuery coming from?
- Get term slug by term id and then explode it
- Add element to widgetpage
- Using functions.php to include code that’s processed inline
- Add loggedout class on body using a function or JS
- How to use get_posts() function in functions.php
- Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]
- Help with IF has focus then… statment
- WordPress AJAX Request returns 400
- Ajax filter with loadmore button
- Hide ‘add to cart’ when certain value in dropdown is selected
- Update $wpdb query with AJAX
- Finding post ID dynamically on click
- Images with overlay
- Many buttons not functioning in WordPress dashboard (as admin)
- DISABLE wordpress upgrade page
- WordPress Jquery+scripts enqueue issue
- Moving CDN jQuery to footer does not work?
- Modify category archive page loop on functions.php
- Adding a jQuery rotator function
- functions.php filters not applied in AJAX call
- Pass max posts to Javascript
- How to use different jquery function of idangero swiper dependant on page template?
- How do I get my nav menu to show sub pages?
- Ajax request with jQuery without WP_ajax
- Why wp_ajax hooks doesn’t work?
- how to handle multiple forloop?
- Changed functions.php file and now site is blank [closed]