Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS IE: Object Required

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26064
    pmw57
    Member

    The Pet Peeves screencast included a part about how IE throws up several Object Required errors when loading the http://rickwilcox.com/magicshop.php 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.

    #63825
    Chris Coyier
    Keymaster

    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)
  • The forum ‘CSS’ is closed to new topics and replies.