Give help. Get help.

  • # September 11, 2009 at 10:37 am

    The Pet Peeves screencast included a part about how IE throws up several Object Required errors when loading the page.

    When looking at the page with Google Chrome, the Developer Tools window shows:

    /js/home-slider.js:1 Uncaught SyntaxError: Unexpected token <

    Then, when viewing the source code for the page, clicking on the /js/home-slider.js link takes you to the homepage of the web site, however clicking on other javascript files correctly show their content.

    Have you worked it out yet?
    The /js/home-slider.js file is missing.

    IE is trying to read the missing script file, and is receiving instead a web page with a 404 error message, or in this case, the home page. IE tries then to interpret the HTML code as javascript code, which is destined for failure.

    Remove that reference to the missing script file from the head section, and the errors will go away.

    # September 11, 2009 at 1:18 pm

    Ah ha, thanks much! It was an intentional change of a file name I was trying to break a link to, but that’s a really hacky and stupid way to remove a JS file of course. This whole thing is just an interim design and was cutting corners. Ah well.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.