Title: Need an example to run a function from Admin Button
Last modified: August 21, 2016

---

# Need an example to run a function from Admin Button

 *  [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * (@adeptris)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/need-an-example-to-run-a-function-from-admin-button/)
 * Hi,
    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!
 * David

The topic ‘Need an example to run a function from Admin Button’ is closed to new
replies.

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)

 * 0 replies
 * 1 participant
 * Last reply from: [Digital Raindrops](https://wordpress.org/support/users/adeptris/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/need-an-example-to-run-a-function-from-admin-button/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
