Title: unable to link javascript with script tag.
Last modified: August 21, 2016

---

# unable to link javascript with script tag.

 *  Resolved [agileArt](https://wordpress.org/support/users/pdxdaniela/)
 * (@pdxdaniela)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/unable-to-link-javascript-with-script-tag/)
 * Hello all.
    i put this in the footer (had also tried the head)
 * `<script src="<?php echo get_template_directory_uri(); ?>/myJs.js"></script>`
   
   just to start testing out and practicing javascript but i get this error message
   in the console (using chrome)
 * [http://localhost/site_a/wp-content/themes/twentyfourteen/myJs.js](http://localhost/site_a/wp-content/themes/twentyfourteen/myJs.js)
   404 (Not Found)
 * Am using a child theme of 2014.I don’t want to enque the script yet.
    and this
   should work. What am i doing wrong please?
 * Thank you
    D

Viewing 1 replies (of 1 total)

 *  Thread Starter [agileArt](https://wordpress.org/support/users/pdxdaniela/)
 * (@pdxdaniela)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/unable-to-link-javascript-with-script-tag/#post-5076273)
 * <script src=”<?php echo get_stylesheet_directory_uri(); ?>/myJs.js”></script>
   
   thx Pullo at sitepoint forums

Viewing 1 replies (of 1 total)

The topic ‘unable to link javascript with script tag.’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [agileArt](https://wordpress.org/support/users/pdxdaniela/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/unable-to-link-javascript-with-script-tag/#post-5076273)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
