purple oar software

"Ensuring Your Web Presence Contributes"

Javascript errors, line numbers from IE

admin's picture

Recently I received an email from Gary who tried out my shareware Javscript editor, ScrypTik. I tried to reply directly, but his email bounced. Gary's question was a good one, so I'll answer it here as it may help others.

Question:

I have downloaded a copy of ScrypTik and I like what it can offer. However, I have the following issue which is typical of my application:

I have a PHP file which refers to numerous js files

e.g.
When running the PHP, The IE browser (v7) will refer to a line number "line 706: character 3" which bears no relation to my PHP source file. It seems to be erroring on some Javascript at run-time. I know this is a run-time error since it occurs in specific situations.

What is the best way of locating the error with your product?

My Answer:

Thanks for your interest in ScrypTik. The easiest way to locate this error is to "view source" in your browser. Then copy this plain text into an editior that shows line numbers (such as ScrypTik), then you can see what is on line 706. Firefox with the HTML tidy plugin does this with view source. Also the Firefox error console will give you a display of the line of code that is giving the error. When developing, I always use Firefox. The firebug plugin is fantastic for AJAX debugging and css issues.

So the answer is that ScrypTik can't really unravel IE error reporting because it does not always know where the Javascript will end up.

Basically, avoid using IE except for testing how your pages look. This should be done every hour so if (when!) something breaks, you have a good idea of what causd it.

Share this using social bookmarking

Anonymous | 15. July 2010 - 4:06

imitation watches

Anonymous | 29. June 2010 - 2:14

A PEASANT had in his replica rolex garden an Apple-Tree which bore no World of Warcraft power leveling fruit but only served as a harbor World of Warcraft power leveling for the sparrows and grasshoppers. 2moons power leveling He resolved wedding dresses to cut it down,aion kinah and taking his axe in his hand,2moons dil made a bold stroke at its roots.shaiya gold The grasshoppers and World of warcraft gold sparrows entreated him not to archlord gold cut down the tree that sheltered them,world of warcraft gold but to spare it,Dragonica crone and they would sing to him and lighten his labors.world of warcraft gold He paid no attention to dog sweaters their request,flyff penya but gave the tree a second and a third blow with his axe. last chaos gold When he reached the hollow of the tree,wow cd keys he found a hive full of honey. Having tasted the honeycomb,replica rolex he threw down his axe,and looking on the tree as sacred, Atlantica goldtook great care of it.

Anonymous | 3. September 2009 - 11:20

With the Dafizilla ViewSourceWith add-on (http://dafizilla.sourceforge.net/viewsourcewith/), you can specify any app (incl. Scryptik) as your default for viewing source files in any mozilla browser

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Filtered words will be replaced with the filtered version of the word.

More information about formatting options

CAPTCHA
This question tests whether you are a human visitor and prevents automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.