phil karras
Senior Member

Joined: 15 Jul 2002
Posts: 1697
Location: MD
|
Posted: Tue Apr 22, 2003 2:11 pm Post subject: Hints: On Debuggin Multiple JS include files |
 |
|
Problem:
An error is given on line 16, but in your HTML file you have multiple js files being called in, something like:
Code: |
<html>
<head>
<title>Index</title>
<script language="JavaScript" src="Scripts/a.js">
</script>
<script language="JavaScript" src="Scripts/b.js">
</script>
<script language="JavaScript" src="Scripts/c.js">
</script>
<script language="JavaScript" src="Scripts/d.js">
</script>
</head>
|
If there is no telling which file the error is in due to all line 16s then try this trick:
In your files:
a.js - move all lines down by one (add a blank line at the top)
b.js - add two blank lines
c.js - add three blank lines
d.js - add four blank lines
Now you should get an error on line 17, 18, 19, or 20 for files a, b, c, and d.js while if the error remains on line 16 it probably means that the error is in the HTML file, unless you've missed a file.
_________________
Phil K
Circle Software Consulting
Test website: http://cs.yrex.com/
Guidelines for Posting: http://jsworkshop.com/posting.html
IHBAAA = It Has Been Asked And Answered
KISS: http://jsworkshop.com/bb/viewtopic.php?t=508
|
|