In a webapplication I came across, there is a javascript line in logout.jsp as:
parent.parent.renderProcessingTextOff();
On debugging the page with IE script debugger, it is breaking on above line with error as:
Object doesn't support this property or method
What is the meaning of this error?
How to solve it?
I am new to javascript, so please explain in simple terms.
Flow of logout is:
on click of logout button, a command is passed and intercepted in interceptor, which directs it to appropriate processor, which forwards the request to logout.jsp.
Its a spring application, if that information is of any help.
Thanks for reading!!
Are there frames or iframes on your page? Or object elements?
parentis a property of thewindowobject (and thewindow.part ofwindow.parentis assumed if you leave it out).From MDN:
So if from an iframe that is at least two levels down, the line
parent.parent.renderProcessingTextOff();says to call therenderProcessingTextOff()function defined by its grandparent.Obviously if that line of code appeared where there wasn’t a grandparent with that function defined then you’ll get the error you quoted.