File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Javascript and Firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Javascript and Firefox" Watch "Javascript and Firefox" New topic

Javascript and Firefox

Niels Laughlin

Joined: Apr 04, 2006
Posts: 19
I'm going through the examples in Geary/Horstmann's Core Java Server Faces. I typed Listing 4-1 "javascript/index.jsp" into NetBeans. This program has an embedded javascript function. I made a typo in the javascript. When Firefox came up, nothing happened at all I decided to switch browsers, to IE. When I ran the app again, IE had an icon that you can click in the lower left hand corner that brought up a box that explained the script error. When I corrected the error, the app worked in IE. I then switched back to Firefox, and the app worked.

The problem seems to be that Firefox does not report javascript errors or reports them in a way I couldn't see. Any comments? Is this a known problem?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41133
Look in the "Tools" menu for "JavaScript Console". That's where the JavaScript and CSS warnings and errors are listed.

Ping & DNS - my free Android networking tools app
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
Great thanks for this tip.

I normally program and test my code with FireFox. Only for javascripting errors I went to Internet Explorer.

Now I know where to find these errors within FireFox.

Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960

Alternatively, type in the URL "javascript:" into the browser's URL control.

Customer surveys are for companies who didn't pay proper attention to begin with.
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
this will come handy

MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
install Firebug

Niels Laughlin

Joined: Apr 04, 2006
Posts: 19
Thanks guys, in Firefox it's Tools-->Error Console. I re-introduced my error (a misspelled variable) and there was the error message!

FireBug looks great at first glance. But as I am just starting out I don't want to add another layer just yet--wrestling with NetBeans is bad enough! Thanks again, Niels
Don't get me started about those stupid light bulbs.
subject: Javascript and Firefox
Similar Threads
Site unaccessible after Firefox update
Firefox unable to detect the javascript on onload event
How to access Table cells content in Firefox
Passing data between pop up and parent window in firefox 2.0.0,4
Access is Denied error in IE 6, but works fine in Firefox 3.0.11