By: Comfortably Anonymous
Times Read: 2,386
Likes: 0 Dislikes: 0
Topic: Programming: Web Applications
This annoying error is surprisingly easy to fix. Most of the time, it's caused by using the Script tag "incorrectly" (Which seems correct in all other situations, but does not work in this case.):
You have probably declared a JavaScript include file using the following syntax (With no "end script" tag):
<script type="text/ecmascript" src="SomeFile.js"/>
This occasionally confuses things due to a technicality with the DOM rules.
The fix is to change it to use a closing script tag rather than the "/>" shortcut:
The fix is simple, just change your declaration to use an End-Script tag instead of the "/>" shortcut:
The fix is surprisingly easy, even if it doesn't fully make sense. (Apparently it has something to do with the more esoteric rules of the Document Object Model)
<script type="text/ecmascript" src="SomeFile.js">< /script>
Usually at this point, the error goes away. :)