Jesdisciple Posted December 30, 2007 Share Posted December 30, 2007 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 More sharing options...
Jesdisciple Posted December 31, 2007 Author Share Posted December 31, 2007 Woops! My problem was that the external SCRIPT uses type="test/javascript", and Firebug apparently doesn't look at the TYPE attribute. Link to comment Share on other sites More sharing options...
Synook Posted January 5, 2008 Share Posted January 5, 2008 Mm. Firebug only picks up HTML Syntactic and Script Syntactic and Runtime errors, not logic errors. Link to comment Share on other sites More sharing options...
Coolguy Posted January 15, 2008 Share Posted January 15, 2008 Nice one... Is this a test? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.