Book Section
-----
TY JavaScript 3rd Ed.
Teach Yourself JS 1.5
Teach Yourself DHTML
Teach Yourself JS 1.3
LLWW: JavaScript

General Section
-----
Discussion Forum
Articles / Tips
JavaScript Links
About the Author
Privacy Policy
Contact Me



Other Sites
-----
Website Workshop
JavaScript Weblog

JavaScript Workshop Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Hints: On Debuggin Multiple JS include files

 
Post new topic   Reply to topic    JSWorkshop Forum Index -> Articles
View previous topic :: View next topic  
Author Message
phil karras
Senior Member
Senior Member


Joined: 15 Jul 2002
Posts: 1697
Location: MD

PostPosted: Tue Apr 22, 2003 2:11 pm    Post subject: Hints: On Debuggin Multiple JS include files Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    JSWorkshop Forum Index -> Articles All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
(c) 1997-2002 Starling Technologies and Michael Moncur. Portions (c) Sams Publishing.