Title: Javascript not working on page
Last modified: August 21, 2016

---

# Javascript not working on page

 *  [Penelope01](https://wordpress.org/support/users/penelope01/)
 * (@penelope01)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/)
 * I am newbe converting an existing site to WordPress and have a test page at [http://www.go-motion.com/jrmusic/stockists/](http://www.go-motion.com/jrmusic/stockists/)
 * This is a page which uses javascript to display a list of dealers in a given 
   state.
 * When I pasted the code from the existing site into a wordpress page in text view
   the script did not work.
 * Obviously I am not doing this correctly.
    I need to use only one script on a 
   single page there should be a simple way to do this
 * <script type=”text/javascript” language=”JavaScript1.2″ src=”http;//www.go-motion.
   com/jrmusic/stores.js”></script>” should go in the header of the page
    then to
   get the list of dealers in the form when they click the button
 * “input onclick=”go(this.form.SelectURL.options)” type=”button” value=”GO” />”
 * I have searched to find a solution but the more I read the more confused I become.
 * All suggestions will be gratefully received
    Many thanks

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379701)
 * You need to start by [enqueuing your script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
   correctly.
 *  Thread Starter [Penelope01](https://wordpress.org/support/users/penelope01/)
 * (@penelope01)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379735)
 * Thankyou for your reply
    This was exactly the information that was so confusing
   I tried putting <?php wp_enqueue_script( stores, ‘/stores.js’, ‘false’ ); ?> 
   on my page but it still doesnt work maybe I need to put this code somewhere else
   or I made a mistake If so where? The theme for the new website was developed 
   using artisteer Many thanks for your help
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379765)
 * You enqueue scripts via your theme’s function.php file and hook them to the `
   wp_enqueue_scripts` action.
 *  Thread Starter [Penelope01](https://wordpress.org/support/users/penelope01/)
 * (@penelope01)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379875)
 * Hi Esmi
    Thanks for the advice – trying to understand, but this is all new to
   me. I had thought that there would be an easy way to add my java scripts in wordpress!
 * I generated my theme with artisteer. In my function.php file I have something
   that looks like
 * wp_enqueue_script(“script.js”);
 * Question – Is this where I have to add my line
    wp_enqueue_script( stores, ‘[http://www.go-motion.com/jrmusic/stores.js&#8217](http://www.go-motion.com/jrmusic/stores.js&#8217);)
   or do I have to append the script itself into script.js ?
 * Please can you help?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379880)
 * I’m sorry but we do not support Artisteer themes here. Try asking on [http://www.artisteer.com/?forum_id=13&p=forum_topics](http://www.artisteer.com/?forum_id=13&p=forum_topics)
 *  Thread Starter [Penelope01](https://wordpress.org/support/users/penelope01/)
 * (@penelope01)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379883)
 * Hi again
    So I tried adding wp_enqueue_script(“stores.js”); underneath wp_enqueue_script(“
   script.js”); in the functions.php of my theme and I put the script stores.js 
   in the same directory This didnt work
 * Please can you help
 *  Thread Starter [Penelope01](https://wordpress.org/support/users/penelope01/)
 * (@penelope01)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379886)
 * > I’m sorry but we do not support Artisteer themes here
 * Sorry but I thought that artisteer is only for designing theme templates
 * Making the website work happens in wordpress. Lots of sites are using javascript,
   so it follows that there must be a simple way to make them work.
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379887)
 * Have you tried implementing it on a default theme?
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379888)
 * You could also look for a plugin for adding JS.
 *  Thread Starter [Penelope01](https://wordpress.org/support/users/penelope01/)
 * (@penelope01)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379910)
 * > You could also look for a plugin for adding JS
 * Many Thanks
    You are a genius! I found a plugin called “Insert JavaScript and
   CSS” [http://wordpress.org/plugins/insert-javascript-css/](http://wordpress.org/plugins/insert-javascript-css/)
   It works on a single page which is exactly what I was looking for No messy coding
   and it worked first time! 🙂

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

The topic ‘Javascript not working on page’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 3 participants
 * Last reply from: [Penelope01](https://wordpress.org/support/users/penelope01/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/javascript-not-working-on-page/#post-4379910)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
