Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Expected Error

 
Jaykiran Teraiya
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jaykiran Teraiya
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic