Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do i put some javascript into the homepage?


norite

Recommended Posts

I have a falling snow effect written in javascript that I want to put on my homepage. Normally, you'd just copy and paste this into the body section of a page written in html. I've tried this with the index.php page, and I'm getting lots of parse errors. I'vr also saved it as a .js file, but that doesn't work either. (Or does it? Is there some php code that will reference it??

And as i only want it on my homepage, which index.php page would i put it into?

 

Cheers

 

:huh:

Link to comment
Share on other sites

It should be put in an external file but will work by just putting it right into the page too. It would go in the index.php file before the </head> tag.

 

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

It should be put in an external file but will work by just putting it right into the page too. It would go in the index.php file before the </head> tag.

 

Jack

 

hmmm...OK, but which index.php file? There are several of them! :huh:

 

OK, i tried it and I just get a single snowflake in the top left hand corner of the homepage - it seems as though it's ignoring the javascript and just referencing the snowflake.....

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...