I am demoing bit of JavaScript in a WordPress blog post that randomly produces some content.
I’d like the user to be able to click a button and regenerate new random content via the script, and I’d like to do it asynchronously.
Does anyone have experience getting AJAX elements to work WITHIN WordPress blog posts? Or is there a simpler method to achieve an equivalent asynchronous update panel?
I am demoing bit of JavaScript in a WordPress blog post that randomly produces
Share
Send your requests to this url – example.com/wp-admin/admin-ajax.php
with atleast one parameter as – action=[action name]
now make a plugin that has –
more details here – http://codex.wordpress.org/AJAX_in_Plugins