This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Object Expected Error 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 » Engineering » HTML, CSS and JavaScript
Bookmark "Object Expected Error" Watch "Object Expected Error" New topic
Author

Object Expected Error

Jaykiran Teraiya
Greenhorn

Joined: Jun 21, 2010
Posts: 12
Hi All,

I've written a funciton




and I am calling that function in an another function like this



and I am getting Object Expected error. I am using IE8.

I would really appreciate any help.

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I just ran his exact code in IE8 and I have no issues, so I suspect your error is possibly in another part of your code you haven't shown us?


GenRocket - Experts at Building Test Data
Jaykiran Teraiya
Greenhorn

Joined: Jun 21, 2010
Posts: 12
Thanks for the reply. The problem was with the scope. There are lot of nested "with" in the code and I didn't realize on which scope I was calling the function.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Jaykiran Teraiya wrote:Thanks for the reply. The problem was with the scope. There are lot of nested "with" in the code and I didn't realize on which scope I was calling the function.


You should never use with in JavaScript. It is very expensive.

Eric
Jaykiran Teraiya
Greenhorn

Joined: Jun 21, 2010
Posts: 12
Eric Pascarello wrote:
Jaykiran Teraiya wrote:Thanks for the reply. The problem was with the scope. There are lot of nested "with" in the code and I didn't realize on which scope I was calling the function.


You should never use with in JavaScript. It is very expensive.

Eric


Yeah I would never use that. It's very old legacy code which we are maintaining.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Object Expected Error
 
Similar Threads
Ajax JSON looping in jQuery
wrestling with json
Submitting form data as JSON with JQuery
Unable to extract JSON Response in JQuery function
My AJAX Chained Selector Function (Enjoy!)