I’m dealing with some old @ss legacy code that was written 3 or 4 developers ago…. Apparently there is some unfinished code and I’m getting errors that passback is not a valid function.
The line in question is: top.passBack('curCtrl', r + "," + g + "," + b);
I’ve done some research and I couldn’t find any reference to a javascript function called passBack. I searched the project and couldn’t find any references to custom function called passBack either.
Was passBack used a long time ago and has it been depreciated? I’ve seen that .opener comes up when I search for passBack. I tried the examples in opener but it says that it returns NULL… This project is a little hokey when it comes to popups and screens. Everything is done through a component (no separation).
Any ideas?
The
topproperty of the window object refers to the topmost window in a hierarchy (a parent-child chain). It’s generally used when you’ve got frames or iframes.Thus there’s probably some global function
passBackon the parent window, or at least the code expects there to be.Here is the MDN page about
window.top. All browsers I know of support it the same way.