Trailing url slash disables custom JS in header! (Cufon)

Permalink
I installed Cufon (sIFR replacement). Check these two links out:
http://dmy.webfactional.com/technology...
http://dmy.webfactional.com/technology/...

The first link, Cufon works. The second link, Cufon doesn't work???

What the...?

I installed Cufon using Don Clark's good instructions here:http://www.concrete5.org/index.php?cID=6114...

Any ideas? Why would an appending slash on the URL affect the running of <script>...</script> code?

garyam
 
Mnkras replied on at Permalink Best Answer Reply
Mnkras
i see whats happening, it can't find the js,

its looking for them inhttp://dmy.webfactional.com/technology/themes/simple_blue/cufon.js...

how did you insert the js into the header?
garyam replied on at Permalink Reply
garyam
Ah, yeah that might explain the solution I just found. I didn't put a forward slash at the beginning of the src attribute on the javascript tags. Adding that works in both cases -- without it, it cannot find the js files when there's a slash at the end of the url.

Cufon now works in both cases. This is code I put in the head tag of the theme's header file:

<!-- cufon font trick http://wiki.github.com/sorccu/cufon/usage/...  /-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/themes/simple_blue/cufon.js" type="text/javascript"></script>
<script src="/themes/simple_blue/Segoe_Print_700.font.js" type="text/javascript"></script>
<script type="text/javascript">
   Cufon.replace('h1');
</script>
garyam replied on at Permalink Reply
garyam
btw, how did you "see" where its looking for the script? It'd be good to know how for future ref... thanks, Mnkras