This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes null or not an object error in IE works perfectly in Firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "null or not an object error in IE works perfectly in Firefox" Watch "null or not an object error in IE works perfectly in Firefox" New topic
Author

null or not an object error in IE works perfectly in Firefox

Phoebe Song
Ranch Hand

Joined: Jan 17, 2002
Posts: 54
I have a method which works fine in FF, however in IE, I get a null or not an object error. Here is the code, IE complain about parameter lp which I pass value from another method.

>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Which line?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Phoebe Song
Ranch Hand

Joined: Jan 17, 2002
Posts: 54
line 13, lp.toLowerCase(), IE complains lp is null or not an object.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

So what is lp when the error occurs?
Phoebe Song
Ranch Hand

Joined: Jan 17, 2002
Posts: 54
doLoadDictionary function is called by another function, lp is parameter passed from the calling function. Here is the calling function.



last line calls function doLoadDictionary, lp is a string, value is language name.

Phoebe Song
Ranch Hand

Joined: Jan 17, 2002
Posts: 54
Any one know what's the problem?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

You didn't answer my question. What is the value of lp when it fails?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: null or not an object error in IE works perfectly in Firefox