I have searched (about 4 hours) and I cannot find a complete example that will let me run a function in my plugin from a button on an admin settings page.
I am working on a plugin for an IOS(Ipad) “off line” sales catalogue where the Products from WordPress or WooCommerce are exported to files, these are uploaded as files or can be pushed by a web service to a cloud based system and can be pulled down to an existing IPad application ($20) so users (Salespeople) can present their products off-line, add customers or orders and then pull any orders back into WordPress.
On a settings page it shows if the file exists and there is a link to download (save) the file.
I have started to build the function to create or re-build the files, I want to call this function when a button (any one of six) is pressed (onClick) event on the settings page.
I have no experience with Ajax and a Google search suggests that I need to call the function with Ajax code.
Is there a complete example anywhere, in an article or in a plugin that will help me, not a ‘foo’, ‘bar’ or ‘foo bar’ but a simple and proper ‘end to end’ working bit of code.
For the Ajax/Jquery part an Idiots guide!
Thanks in Advance!
The topic ‘Need an example to run a function from Admin Button’ is closed to new replies.