Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • 8
    The "onload" listener will be fired even if there's a javascript error. Commented Feb 11, 2009 at 21:38
  • 44
    Well, yes if the file LOADS and there is an error in the file itself, but if the file is not served up, the onload will never fire. Commented Feb 11, 2009 at 21:49
  • 1
    yes, true, that's why I asked to be more specific of what kind of error he's looking for. Commented Feb 11, 2009 at 21:51
  • 18
    There is onerror evnt for script tag. It will fire when the resource not found. Commented Dec 22, 2017 at 8:59
  • 2
    @Diodeus-JamesMacFarlane as others have commented, there is an error event, at least in all modern browsers - down voted for incorrectly stating "There is no error event for the script tag". Please update or remove this outdated/wrong answer. Commented Oct 28, 2021 at 13:11