Title: JavaScript and Ajax
Last modified: August 12, 2019

---

# JavaScript and Ajax

 *  [dcwebcat67](https://wordpress.org/support/users/dcwebcat67/)
 * (@dcwebcat67)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/javascript-and-ajax/)
 * Hello –
 * Not sure if this is the correct forum for my questions? We created a login which
   then pulls data after hitting submit. This has been tested in a “non-WordPress”
   environment. I am now testing it using WP because this is ultimately where it
   will go. I have a few questions.
 * 1. I have several .JS files. Do I need to put those files in the WP file manager?
 * 2. For Ajax to work, do I need a special plugin or anything? I have read that
   there is already an ajax file in the WP File Manager.
 * Due to privacy restrictions, I am not able to post the actual code here.
 * Thank you!

Viewing 1 replies (of 1 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/javascript-and-ajax/#post-11825700)
 * 1. No, you don’t put JS files in WP file manager. You write a plugin that calls`
   wp_enqueue_script` only on the pages it is needed on.
    [https://developer.wordpress.org/reference/functions/wp_enqueue_script/](https://developer.wordpress.org/reference/functions/wp_enqueue_script/)
 * 2. You don’t need a special plugin; you just need to follow the ajax standard,
   which is the naming of your action hook to match the action parameter and checking
   the caller by using `check_ajax_referer` for the nonce.
    [https://developer.wordpress.org/plugins/javascript/ajax/](https://developer.wordpress.org/plugins/javascript/ajax/)
   [https://developer.wordpress.org/reference/functions/check_ajax_referer/](https://developer.wordpress.org/reference/functions/check_ajax_referer/)
   for JSON: [https://developer.wordpress.org/?s=send_json](https://developer.wordpress.org/?s=send_json)

Viewing 1 replies (of 1 total)

The topic ‘JavaScript and Ajax’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [Joy](https://wordpress.org/support/users/joyously/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/javascript-and-ajax/#post-11825700)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
