Javascript containing errors sometimes does not execute without any error message. The following line for example gives a syntax error “missing ; before statement” if you type it in the Firebug console, because it contains a quotation mark at the wrong place:
window.location.href = "some_url?param1="+12+"+"param2="+13
But if you use it on web page, then sometimes the Javascript block which contains it will not execute at all without any error messages in the Firebug console or elsewhere (using Firefox 10.0). In my case I used this example in an OnClick event handler of the fullCalendar jQuery plugin to load a new page if the user clicks on a certain date. How it is possible to force Javascript to enable the display of suitable ‘unobtrusive’ error messages for Firefox (or Firebug) ?
It depends of course upon the browser you are using if errors messages are displayed or not. IE gives warnings, Firefox does not. Plugins like Firebug or the Web Developer extension come to the rescue here. If you are using Firefox’s Web Developer extension you may see a red exclamation mark in the far right of the toolbar when a JavaScript error has occurred. Click on it to open the Error Console.
Firebug is able to show Javascript errors in the “Console” tab, but only if “Show JavaScript” Errors is activated (on Linux select the “Console” tab and click on the right arrow next to “Console” and check the option “Show JavaScript Errors”)