Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stack overflow error in Javascript

 
Jahnavi Kondapaneni
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have written a simple javascript function to open a new window by using the method window.open() method.
When i run the application in Tnternet explorer I get an error "Stack Overflow at line:0" constantly.
Can anybody explain me why we get this error and a solution for this.
I even tried by turning off the "Disable script Debugging" in internent options.
But still there is no change.

Thanks in advance

Regards,
Janu
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your magical Code is?

Eric
 
Jahnavi Kondapaneni
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Here is the code snippet.


I am calling this javascript code from Flex using the below code
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LOL... You created a circular reference.

When you declare functions in global scope [as you did], you can call them via window.functionName().

so the following code



can be called via


or



along with countless other ways.

You just overwritten the window.open function so your code keeps calling itself. Rename your function to something else.

Eric
 
Jahnavi Kondapaneni
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh thanks! Eric....I will change The function name.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never name anything submit either.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic