PDA

View Full Version : Linking to Javascript in template's header


sparklywater
07-09-2008, 11:29 PM
I'm trying to link to a single javascript file from inside the header template using the following code. I've tested this code in a non-vB HTML page and it works fine, but when placed into the header template through the admin CP, this same code doesn't seem to work:

<!--[if lte IE 6]>
<script type="text/javascript" src="supersleight.js"></script>
<![endif]-->


any reason why the script may not be working?

This is where the script is from:

http://24ways.org/2007/supersleight-transparent-png-in-ie6

--------------- Added 1215660813 at 1215660813 ---------------

I'm pleased to say that the problem's solved now, I had a url rewrite / redirect on the .png image on my vB page, so the forum thought it was linking to a .gif icon whereas I was redirecting it to a .png file. I guess the Javascript can't recognise such redirects so treated the image as a .gif instead, hence didn't apply the transparency effect on the .png.