Title: Adding a java script to page
Last modified: August 19, 2016

---

# Adding a java script to page

 *  [figsbaby](https://wordpress.org/support/users/figsbaby/)
 * (@figsbaby)
 * [17 years ago](https://wordpress.org/support/topic/adding-a-java-script-to-page/)
 * I am trying to insert a java script and have followed the instructions on doing
   so and it will still not show up on the page…any ideas…

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

 *  [shane-g](https://wordpress.org/support/users/shane-g/)
 * (@shane-g)
 * [17 years ago](https://wordpress.org/support/topic/adding-a-java-script-to-page/#post-1090330)
 * Hi,
 * Refer this article:
 * [http://codex.wordpress.org/Using_Javascript](http://codex.wordpress.org/Using_Javascript)
 * If you receive any error then provide it so that you can get proper assistance
   and comment..
 * Thanks,
 * Shane G.
 *  [gazouteast](https://wordpress.org/support/users/gazouteast/)
 * (@gazouteast)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/adding-a-java-script-to-page/#post-1090548)
 * I too would like an answer to this question
 * Situation – I have a WP 2.8.1 install in a folder under home. I also have an 
   osCommerce install in a folder under home. I have a simple 3 file addition for
   osCommerce (comprising a css file, a modified info_box file, and a php script
   file).
 * On an html page on any website I simply add a standard ‘<script src=”blah” type
   =”blah></script>’ tag and the data shows up.
 * On WP on the same site, inserting the script tags into a page template causes
   a content no-show problem, but FireBug reveals that the script output is indeed
   present in the page (as a line-numbered text list between the script tags).
 * However, if I change the script tags to make it a php include statement, the 
   content then does indeed show, but with a server error immediately above it stating
   the theme header had already sent header information, and when I drill into the
   error, it relates to both WP and osCommerce trying to issue cookies from the 
   same URL page.
 * OsCommerce then dies and the rest of the WP page fails to load (no posts etc).
   Switching back to script tags then runs the WP side of the page normally, but
   the products from osCommerce don’t display despite the code again being in the
   page source.
 * This is driving me completely nuts – I’ve spent 4 days trying to get it fixed…
   it gets worse ….
 * If I change the script to point at a different oscommerce/includes/boxes/filename.
   php file, that one then shows fully correctly but only allows display of a single
   product, not the 2×2 array of 4 products that I want from the original /boxes/
   filename.php
 * This then leads me to think that the problem overall lies within WordPress php-
   script handling system (it’s not javascript – its php script) because all parts
   of the oscommerce end are working correctly, but the desired content is not showing
   up in WP when more than one product is returned from the osCommerce database.
 * I’ve scoured wp.org and the forums and tried every fix listed thus far and nothing
   is curing this.
 * The theme in use is the excellent WyntonMagazine theme from [http://www.der-prinz.com](http://www.der-prinz.com)
   and I use it on several sites already, but this is a major rehack of it for this
   site.
 * Any help appreciated
    Gaz

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

The topic ‘Adding a java script to page’ is closed to new replies.

## Tags

 * [java-script](https://wordpress.org/support/topic-tag/java-script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [gazouteast](https://wordpress.org/support/users/gazouteast/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/adding-a-java-script-to-page/#post-1090548)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
