Forum Moderators: open
I'd like to know if it's possible to run a function defined in a parent window from a sub window (new window opened by parent window)?
I've tried using this in the subwindow:
window.opener.document.parentWindowFunction()
...and FireBug keeps telling me that parentWindowFunction() is not a function even though I have no problems running parentWindowFunction() directly from the parent window.
The only way I figured out to run this function is to do this:
window.opener.location = "javascript:parentWindowFunction();
...which seems kind of ugly (and hacky).
Is there a better way?