Most hobbyist web developers know how to ensure their (X)HTML, CSS and links are valid. Bloggers can check the validity or their RSS or Atom feeds. Even if your JavaScript knowledge is limited to copy-and-paste (e.g. from JavaScript Source), it's still useful to be able to check that the scripts you are using don't generate errors or warnings.
One means of identifying errors and checking your code for warnings is to use Firefox together with the Web Developer extension. It's worth noting that this multifaceted tool does far more than check for JavaScript errors:
![]()
The Web Developer extension adds a menu and a toolbar to the browser with various web developer tools. It is designed for Mozilla Firefox and Mozilla, and will run on any platform that these browsers support including Windows, Mac OS X and Linux. The extension is highly configurable and contains many powerful features including CSS manipulation, multiple validation options and tools to display information about the current page.
A similar toolbar exists for Windows IE users.
With the Web Developer extension installed, as a page loads an icon indicates the presence of any errors:
![]()
... or warnings:
![]()
Clicking on the red icon gives you details about the error, opening the built-in JavaScript Console:

Likewise, clicking on the yellow icon offers details about warnings:

The option to show strict JavaScript warnings is enabled from the Options drop-down menu in the Web Developer Toolbar:

The error "assignment to undeclared variable XXX" seems to be very common in copy-and-paste JavaScript, but it is easy to find information on how to fix these warnings. Of course warnings generated by referenced third-party JavaScripts, such as those used by Google AdSense, cannot be so easily be addressed. Some AdSense-related warnings pertained to the script in my pages e.g. "asignment to undeclared variable google_ad_client", which I could fix by adding:
var google_ad_client;
Other warnings relate to:
- asignment to undeclared variable google_XXX
- reference to undefined property w.google_XXX
- function ga does not always return a value
As such warnings apparently slow down script execution I e-mailed AdSense to see if they have plans to fix their code. They replied to say:
We have forwarded your findings onto our team for further investigation. Although we designed our ad code to be as easy to use and execute as possible, there are certain limitations inherent with some browsers.
Hmm... a browser problem? Clearly no comprehension of the issue.









I've done some changes and downloaded some javascripts into my template now. Not really sure if it works on Mac.
Btw, is there any connection between the term Java in Javascript and the other Java term as an island of Indonesia?
Jeffry, if you mean the mobile buttons yes they work using Safari, although they are not easy to click. It's a bit like that fairground game where you try to clobber snakes as they pop out of their holes... not an ideal interface IMHO.
The origin of the term "Java" (programming language) is unknown; it has been suggested that it stands for Just Another Vague Acronym (see here). In any case, it is not related to JavaScript or the Indonesian island.
Bruce, thanks for informing me about that.
OK, so it's not related. I thought some Java programmers are normally having Java coffee while creating something.