File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript and Firefox

 
Niels Laughlin
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look in the "Tools" menu for "JavaScript Console". That's where the JavaScript and CSS warnings and errors are listed.
 
Remko Strating
Ranch Hand
Posts: 893
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17621
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alternatively, type in the URL "javascript:" into the browser's URL control.
 
Richard Green
Ranch Hand
Posts: 536
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this will come handy
http://chrispederick.com/work/webdeveloper/
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
install Firebug http://www.getFirebug.com

Eric
 
Niels Laughlin
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic