Title: enqueue scripts / setup ajax
Last modified: August 22, 2016

---

# enqueue scripts / setup ajax

 *  Resolved [eynugget](https://wordpress.org/support/users/eynugget/)
 * (@eynugget)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/enqueue-scripts-setup-ajax/)
 * Awesome framework! Thank you!
 * Is there an ideal place/callback to enqueue scripts/css and setup ajax calls?
   
   Does the framework have an easy way to setup ajax calls?
 * Thanks!
 * [https://wordpress.org/plugins/admin-page-framework/](https://wordpress.org/plugins/admin-page-framework/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [miunosoft](https://wordpress.org/support/users/miunosoft/)
 * (@miunosoft)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/enqueue-scripts-setup-ajax/#post-5655546)
 * To enqueue scripts you can use the `enqueueScript()` method.
 *     ```
       $this->enqueueScript(
           $sUrlOrPath, // source url or path
           $sPageSlug     // page slug
       );
       ```
   
 * For CSS, use `enqueueStyle()`.
 *     ```
       $this->enqueueStyle(
           $sUrlOrPath, // source url or path
           $sPageSlug     // page slug
       );
       ```
   
 * As for Ajax, an easy way I can think of is to use jQuery and send an Ajax request
   to the currently loading page with additional url query key-values. Then in the`
   start()` meethod, which is a user constructor of the factory class you extend,
   check the `$_GET` array and if a desired key is set, perform a certain task and
   return relevant output.
 * If you need more help regarding Ajax, create a new topic. Let’s resolve the enqueuing
   issue you are having first.
 *  Thread Starter [eynugget](https://wordpress.org/support/users/eynugget/)
 * (@eynugget)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/enqueue-scripts-setup-ajax/#post-5655547)
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘enqueue scripts / setup ajax’ is closed to new replies.

 * ![](https://ps.w.org/admin-page-framework/assets/icon-256x256.png?rev=998199)
 * [Admin Page Framework](https://wordpress.org/plugins/admin-page-framework/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-page-framework/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-page-framework/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-page-framework/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-page-framework/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-page-framework/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [eynugget](https://wordpress.org/support/users/eynugget/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/enqueue-scripts-setup-ajax/#post-5655547)
 * Status: resolved