Title: Update the Codex-Using Javascript page
Last modified: August 19, 2016

---

# Update the Codex-Using Javascript page

 *  [tsalagi](https://wordpress.org/support/users/tsalagi/)
 * (@tsalagi)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/update-the-codex-using-javascript-page/)
 * I’ve implemented a direction that the WordPress give on it’s [Using_Javacript](http://codex.wordpress.org/Using_Javascript)
   page and it didn’t work. I thought there was something wrong with my code or 
   page or setup or something but the direction
 * > To use Javascript repeatedly within your site, you can either set the call 
   > for the Javascript, or the script itself, in the head of your header.php template
   > file, between the meta tags and the style sheet link, no differently than you
   > would if you were using Javascript in any HTML page. To “load” the Javascript
   > file into your site, in the head, add something like this:
 * ‘<script type=”text/javascript” src=”/scripts/emailpage.js”></script>’
    is totally
   incorrect.
 * How frustrating!
 * How do we get someone to change the codex? For those who want to know, you can
   use this line of code.
    ‘<script type=”text/javascript” src=”<?php bloginfo(‘
   template_url’); ?>/js/maxrating.js”></script>’ The “template_url” will read to
   the root directory of your current template and them after the closing of the
   php code use a forward slash/path/to/your/file.js. If your javascript file isn’t
   in a sub-directory and in the root all you need is the forward slash “/” and 
   the name of the file.
 * I hope this saves someone hours of frustration!

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

 *  Thread Starter [tsalagi](https://wordpress.org/support/users/tsalagi/)
 * (@tsalagi)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/update-the-codex-using-javascript-page/#post-1333009)
 * Correction.
 * > For those who want to know, you can use this line of code.
   >  ‘<script type=”
   > text/javascript” src=”<?php bloginfo(‘template_url’); ?>/js/maxrating.js”></
   > script>’
 * Do not just use that line of code. Replace it with your own path and file name.
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/update-the-codex-using-javascript-page/#post-1333010)
 * Anyone can create an account at the codex, login, and make changes 🙂
 * It is “just” a wiki, after all.
 *  Thread Starter [tsalagi](https://wordpress.org/support/users/tsalagi/)
 * (@tsalagi)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/update-the-codex-using-javascript-page/#post-1333013)
 * I wasn’t aware of that. Thanks for the info. I’ll get right on it.

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

The topic ‘Update the Codex-Using Javascript page’ is closed to new replies.

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [path](https://wordpress.org/support/topic-tag/path/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 3 replies
 * 2 participants
 * Last reply from: [tsalagi](https://wordpress.org/support/users/tsalagi/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/update-the-codex-using-javascript-page/#post-1333013)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
