Title: Javascript question&#8230;.
Last modified: August 18, 2016

---

# Javascript question….

 *  [bmg1227](https://wordpress.org/support/users/bmg1227/)
 * (@bmg1227)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/javascript-question-1/)
 * I’m trying to add my counter code via external javascript, so it can pass validation.
   I have added the following to my header:
 * <script type=”text/javascript” src=”[http://www.briangardner.com/javascript/counter.js”></script&gt](http://www.briangardner.com/javascript/counter.js”></script&gt);
 * My question is how do I call this so that it actually works? Does that make sense?

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

 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/javascript-question-1/#post-456047)
 * In your HTML somewhere you might have to insert some script like:
 * `<script type="text/javascript">
    <!-- counterFunction(); --> </script>
 * Or something similar.
 *  [spencerp](https://wordpress.org/support/users/spencerp/)
 * (@spencerp)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/javascript-question-1/#post-456061)
 * This might help a little bit.
    [http://codex.wordpress.org/Using_Javascript](http://codex.wordpress.org/Using_Javascript)
 * spencerp
 *  Thread Starter [bmg1227](https://wordpress.org/support/users/bmg1227/)
 * (@bmg1227)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/javascript-question-1/#post-456077)
 * Thanks for the replies – I actually was able to change my counter code so that
   it passed validation. Appreciate the help!

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

The topic ‘Javascript question….’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [bmg1227](https://wordpress.org/support/users/bmg1227/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/javascript-question-1/#post-456077)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
