Title: invisible javascript?
Last modified: August 18, 2016

---

# invisible javascript?

 *  [spitstatic](https://wordpress.org/support/users/spitstatic/)
 * (@spitstatic)
 * [21 years ago](https://wordpress.org/support/topic/invisible-javascript/)
 * I know that javascript can be used in a post or page if you call it externally.
   But I’m still having a problem.
 * I made a page here:
    [http://spitstatic.net/exchanges/](http://spitstatic.net/exchanges/)
 * I’m calling the following code:
    `<script type="text/javascript" src="http://
   www.villainess.net/fading/exchange.js"></script>`
 * When I view the resulting page, it does not show up. But upon viewing the source
   code, it’s there. Also, if I go to edit the page, at the bottom of the page it
   appears with no problem (where you see a preview of the post or page). So I don’t
   understand what is keeping the result from appearing on the published page.
 * I don’t have anything in my CSS that would hide it.
 * Would anyone be willing to tell me what I’m doing wrong, or what I can do to 
   fix this?

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

 *  [jabecker](https://wordpress.org/support/users/jabecker/)
 * (@jabecker)
 * [21 years ago](https://wordpress.org/support/topic/invisible-javascript/#post-202000)
 * Does it just display a button? I can see it.
 *  [Orin](https://wordpress.org/support/users/orin/)
 * (@orin)
 * [21 years ago](https://wordpress.org/support/topic/invisible-javascript/#post-202009)
 * If you’re calling an external javascript, it’s best to place it inside the <head
   > element. But remember all you’re doing is telling the browser to _go get it_.
   The code has to be executed as a behavior, meaning you’ll be calling an event
   somewhere.
 * Say you want to execute the whole code when a page loads. You’d type <body onload
   =”exchange.js”> For a list of common event handlers, [look here](http://www.w3schools.com/html/html_eventattributes.asp).
   I’m not quite sure what your script does, but there is also a way to execute 
   only one function in any code you have imported.
 *  [Lorelle](https://wordpress.org/support/users/lorelle/)
 * (@lorelle)
 * [21 years ago](https://wordpress.org/support/topic/invisible-javascript/#post-202029)
 * I’ve tested out using javascript within a post and the answer is here: [http://wordpress.org/support/topic/33137](http://wordpress.org/support/topic/33137)

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

The topic ‘invisible javascript?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 4 participants
 * Last reply from: [Lorelle](https://wordpress.org/support/users/lorelle/)
 * Last activity: [21 years ago](https://wordpress.org/support/topic/invisible-javascript/#post-202029)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
