Welcome to WebmasterWorld Guest from 50.16.78.128

Forum Moderators: open

Message Too Old, No Replies

Problem with Script that Loads Last

   
3:13 pm on Nov 1, 2013 (gmt 0)

10+ Year Member



On one site everything works fine when the javascript script loads just before the closing head tag.

It does not work on another site with a theme that forces a link tag (to load the favicon) appears just before the closing tag.

Could a link tag prevent the javascript from loading properly or should I be looking elsewhere for the reason the script is not working?
3:28 pm on Nov 1, 2013 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



What is the JavaScript doing? Is it looking for the link tag? The favicon? Placement of the script file can certainly break the script if it has dependencies that don't exist yet.
4:00 pm on Nov 1, 2013 (gmt 0)

10+ Year Member



Fotiman,

Thank you for your response.

I'm not sure. Without the link load it works, with it the thing breaks.

<script src="http://example.com/js/balloons.js"></script>
<link rel="shortcut icon" href="http://example.com/favicon.png" />
</head>
4:06 pm on Nov 1, 2013 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



There's nothing obvious there. Would need to see the contents of balloons.js.
4:59 pm on Nov 1, 2013 (gmt 0)

10+ Year Member



After a Duh! moment I added the link load to the working site. It works fine, so it must be another issue. Before posting the code I'm going to dig a little deeper on the site's html.

Thanks for your help, Fotiman.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month