homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Problem with Script that Loads Last

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

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)

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)


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" />


 4:06 pm on Nov 1, 2013 (gmt 0)

There's nothing obvious there. Would need to see the contents of balloons.js.


 4:59 pm on Nov 1, 2013 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved