Announcement

Collapse
No announcement yet.

Linking to Javascript in template's header

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sparklywater
    replied
    yep 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.

    Thanks again Michelle for being helpful

    Leave a comment:


  • sparklywater
    replied
    I think I may have found the solution to my problem, I just need to test it out and will post here in a few mins with the outcome...

    Leave a comment:


  • sparklywater
    replied
    yes, I've just double-checked that the filepath to x.gif is correct. I've also deleted my temporary internet files before refreshing the page as this might have prevented the transparency from showing up, but unfortunately the problem remains.

    Leave a comment:


  • Michelle
    replied
    Have you updated the path to x.gif to work properly?

    Leave a comment:


  • sparklywater
    replied
    Thanks for your reply, I've just tried adding the code into the headinclude template, but the script still does not work, ie. the background of the .png image still does not show transparency in IE6. The strange thing is that the script works fine in a normal HTML webpage when I try it (by changing the filepaths accordingly), but it doesn't seem to work in vBulletin. I see some other codes in the headinclude template for other javascript files, but including the new code close to these codes does not fix the problem either.

    Leave a comment:


  • Michelle
    replied
    You'd better place scripts in headinclude, so they are inside the <head>...</head> tag.

    Leave a comment:


  • sparklywater
    started a topic Linking to Javascript in template's header

    Linking to Javascript in template's header

    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:

    Code:
    <!--[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-...ent-png-in-ie6

Related Topics

Collapse

Working...
X