Diagnosing JS error that is not reported

D

DrKen

I am having trouble finding the error in my .js file. I have a web
page that I am using outside of its web application in order to test a
small change to a JavaScript file. I am getting an error while the
page is rendering. It stops part way through rendering. My experience
has been that this is a JavaScript error. However, when I try to open
the .html file in Firefox, the Error Console seems to list no errors,
warnings, or messages for the page. I opened Firebug on the page and
then opened the .html file and the Firebug part disappeared. I tried
using jslint but that gave me all sorts of grief over code that has
worked for three years and stopped aorund line 30 instead of giving
errors for the entire file . Is there a good tool to find JavaScript
coding errors? Thanks.

Ken
 
D

Denis McMahon

I am having trouble figuring out the correct way to post to multiple
newsgroups on usenet.

1) Get a proper news client
2) help -> crosspost

Rgds

Denis McMahon
 
G

Gene Wirchenko

I am having trouble finding the error in my .js file. I have a web
page that I am using outside of its web application in order to test a
small change to a JavaScript file. I am getting an error while the
page is rendering. It stops part way through rendering. My experience
has been that this is a JavaScript error. However, when I try to open
the .html file in Firefox, the Error Console seems to list no errors,
warnings, or messages for the page. I opened Firebug on the page and
then opened the .html file and the Firebug part disappeared. I tried
using jslint but that gave me all sorts of grief over code that has
worked for three years and stopped aorund line 30 instead of giving
errors for the entire file . Is there a good tool to find JavaScript
coding errors? Thanks.

I cut out sections of code, save, test, restore the code until I
find a relevant change.

Sincerely,

Gene Wirchenko
 
D

Denis McMahon

Did two news articles really end up with the same message ID?

I read substantially similar (but not properly cross-posted) articles by
the same OP in two newsgroups.

I therefore diagnosed his problem as an inability to cross-post properly
to usenet, restated his question to match his observed problem, and
answered it. ;)

Rgds

Denis McMahon
 
D

Dr J R Stockton

In comp.lang.javascript message <aaf4dcf8-e665-4b88-807d-f6e6d0292fae@v5
g2000yqn.googlegroups.com>, Mon, 28 Nov 2011 12:07:33, DrKen
I am having trouble finding the error in my .js file. I have a web
page that I am using outside of its web application in order to test a
small change to a JavaScript file. I am getting an error while the
page is rendering. It stops part way through rendering. My experience
has been that this is a JavaScript error. However, when I try to open
the .html file in Firefox, the Error Console seems to list no errors,
warnings, or messages for the page. I opened Firebug on the page and
then opened the .html file and the Firebug part disappeared. I tried
using jslint but that gave me all sorts of grief over code that has
worked for three years and stopped aorund line 30 instead of giving
errors for the entire file . Is there a good tool to find JavaScript
coding errors? Thanks.

Then there is obviously at least one actual error in your HTML or
JavaScript files. More detail cannot be given without seeing those
files.

One possible explanation is that you have a bad loop statement trying to
execute an infinite (approximately) number of times, and that your
browser has not got an enabled loop detector.

Another is that your browser's error detector is nor detecting, perhaps
being set to show only messages, Verify that by introducing a known
error.

A simple test is to introduce an alert(number) call at a place that you
know execution reaches (to prove you can do it), and others where it
might or might not be reaching. But be careful not to do that in high-
count inner loops.

Another test is to disable JavaScript and see whether the whole of the
HTML renders as then expected. If it does not, you have at least one
non-JavaScript error.

You should, of course, have validated the HTML & CSS at www.w3.org, and
have said so.
 
T

Tim Streater

Dr J R Stockton said:
In comp.lang.javascript message <aaf4dcf8-e665-4b88-807d-f6e6d0292fae@v5
g2000yqn.googlegroups.com>, Mon, 28 Nov 2011 12:07:33, DrKen

Try using more browsers. Safari has a nice Develop menu, you can look in:

Develop -> Show error console

to see if there was a javascript error.
 
J

J.R.

I am having trouble finding the error in my .js file. I have a web
page that I am using outside of its web application in order to test a
small change to a JavaScript file. I am getting an error while the
page is rendering. It stops part way through rendering. My experience
has been that this is a JavaScript error. However, when I try to open
the .html file in Firefox, the Error Console seems to list no errors,
warnings, or messages for the page. I opened Firebug on the page and
then opened the .html file and the Firebug part disappeared. I tried
using jslint but that gave me all sorts of grief over code that has
worked for three years and stopped aorund line 30 instead of giving
errors for the entire file . Is there a good tool to find JavaScript
coding errors? Thanks.

Ken

Debugging JavaScript:
<http://siliconforks.com/doc/debugging-javascript/>

HTH.
 
J

John G Harris

I read substantially similar (but not properly cross-posted) articles by
the same OP in two newsgroups.

I therefore diagnosed his problem as an inability to cross-post properly
to usenet, restated his question to match his observed problem, and
answered it. ;)

You made it look as though he wrote the words you "quoted". That is a
very wrong thing to do. You'll see it's the same as forging his name
when you think about it.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top