Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding Javascript


Guest

Recommended Posts

Hi,

 

I have successfully customized my header to add my images, but I would like to be able to integrate my Dreamweaver mouseover image effect as well.

 

The images I would like to Javascript to effect appear in the header. I have searched the forum, and one entry suggested adding the Javascript into the "application_top.php" file. I did so, adding the script after the final "?>" tag. Though the main page, login and logoff pages appeared fine (and the Javascript worked in them), any other subsequent page I clicked to gave me the following error:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/mydomain/public_html/catalog/includes/application_top.php:508) in /home/mydomain/public_html/catalog/includes/functions/general.php on line 29

 

If I should be placing the Javascript in another location or possibly inside the ?>, please let me know. Any help is appreciated.

Link to comment
Share on other sites

For those of you trying to insert Javascript onto the header of your sites in the future, as an FYI, Iggy was correct as to the placement of the Javascript, but I also had to add it inside the header of almost every other page as well (inside catalog/). FYIs for the future.

Link to comment
Share on other sites

The javascript should be placed in a javascript file.Then that file should be called from includes/header.php. This will help you with the search engines and also prevent you from having to include it in every file.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...