Jump to content

External JS Served and Rejected...?


Jesdisciple

Recommended Posts

I have this HTML file:

<html>	<head>		<title>Titled Document</title>		<script type="test/javascript" src="dummy.js"></script>		<script type="text/javascript">//			var foo = 'bar';			function main(){				alert(foo);			}		</script>	</head>	<body onload="main();">			</body></html>

and dummy.js:

var foo = 'bar';

This causes an error in FF, OP, and IE, along the lines of "foo is undefined," but JSLint has no complaints and Firebug knows what dummy.js contains. Uncommenting the first line of the inline JS resolves the error. What's going on?

Link to comment
Share on other sites

Mm. Firebug only picks up HTML Syntactic and Script Syntactic and Runtime errors, not logic errors.

Link to comment
Share on other sites

  • 2 weeks later...

Nice one... Is this a test?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...