Title: Can&#8217;t get basic Javascript functions working&#8230;please help
Last modified: August 19, 2016

---

# Can’t get basic Javascript functions working…please help

 *  [danieltharris](https://wordpress.org/support/users/danieltharris/)
 * (@danieltharris)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/cant-get-basic-javascript-functions-workingplease-help/)
 * Hi,
 * I’m new to the forums and relatively new to WordPress. I’m usually a .Net developer,
   but WordPress is so good for quickly deploying and easily managing websites and
   blogs, I like to use it, and recommend it to a lot of people.
 * The problem i’m having with it though is that I can’t seem to find out where 
   to put my Javascript.
 * For starters i’d like to just make a simple alert box pop up on each page, just
   to show it’s working.
 * I had assumed going into the folder for my active theme and adding the code to
   the header.php file between the <head></head> tags would do the trick…but no 
   alert box.
 * I know this may not be the optimal way to do it, but first things first I just
   want to see a bit of Javascript work in my WordPress site.
 * Can’t seem to find anywhere that just talks about the basic way to do this (probably
   as it’s useless other than to test it’s working).
 * I assumed header.php was just included at the top of all pages that use the theme,
   but tried adding in some comments to it, and they didn’t appear in the pages 
   when I viewed source even.
 * I just want to know where I can put my JS code for the alert box to make it work
   first…Simple question, which i’m assuming has a simple answer.
 * So any help is really appreciated.

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/cant-get-basic-javascript-functions-workingplease-help/#post-1570970)
 * [http://codex.wordpress.org/Using_Javascript](http://codex.wordpress.org/Using_Javascript)
   
   [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)

Viewing 1 replies (of 1 total)

The topic ‘Can’t get basic Javascript functions working…please help’ is closed to
new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/cant-get-basic-javascript-functions-workingplease-help/#post-1570970)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
