BUTTON TO CALL A PHP AJAXIZED FUNCTION
-
Hi,
I’m not very good at coding, so I’m struggling a bit with this. I’ve tryed lots of suggestions out there, but cannot make it work.
THE GOAL:
I want to create a button that when clicked calls a php function that executes without loading the whole page, just the code inside it. Everytime u click on that button again, that AJAXIZED function reloads.THE ISSUE:
The php function works, but I cannot make the button call that php function.WHAT I’V GOT SO FAR (simplified):
I have a function that creates the button shortcode:
function add_shortcode_button_function() { /*I have tryed a bunch of things to create the button, but none have worked*/ } add_shortcode( 'the_button_shortcode', 'add_shortcode_button_function' );
I have created the function with the AJAXIZED div:
function ajaxized_function() { echo '<div id="ajaxize_this:reloaded_content_function:xxxxxx></div>'; }
I have created the function that loads inside the AJAXIZED div:
function reloaded_content_function() { echo 'The button has been clicked.'; }
THE QUESTION:
So the question would be, what should be the button code?Thanks in adavnce!!!
- The topic ‘BUTTON TO CALL A PHP AJAXIZED FUNCTION’ is closed to new replies.