File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best Tool For debugging Javascript

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a problem with my page. Each time i press a button I always get an error on Line...

Please is there a tool thet one can use to debug this error.

 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firebug is an excellent plugin for Firefox. But if you already have an error message, but don't know what to do with it, another tool may not help you. What is the error, and what is the code doing when it occurs?
 
Abiodun Adisa
Ranch Hand
Posts: 495
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually we are using IE (Project requirement) and whenever i click a button i always get something like this





Looked at the source but can't locate the error


 
Niv Tyagi
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Firebug is your friend. http://getfirebug.com/

you can debug JS via firebug. change CSS, edit html and what not.
I used firebug almost everyday/everyhour.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, nobody can tell you not to use Firefox to debug this issue (assuming that code doesn't make use of IE-only functionality).

Post the full code of the line where that error occurs. You may want to do an "alert(...)" on the intermediate objects (like "tempRows" and "cells") to make sure they are what you think they are.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE8 has a debugger built in.

'tempRows.cells[...].getElementsByTagName is null or not an object


That tells you exactly what is wrong, you are referencing something that does not exist. If you want to go old school, add alert statements and see what is going on there. I would guess that cells[x] is the wrong index.

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic