Mark wrote:
The situtation is that I'm trying to ensure that certain functions are
only called by functions that I want them to be called from. I have a
popup window which has a function which calls a function in the opener
window (this works fine). The only thing is when I go to get the
caller property of the function in the opener window it is null, it
does not return the function in the popup window that called it.
The - caller - property was not standardised into ECMAScript so it isn't
that widely supported. But separate browser windows are separate script
environments and they usually care about which window various object
belong to (functions being objects in this sense).
Usually though, you prevent functions that should not call other
functions form doing so by not coding the function calls into the bodies
of those functions. You seem to have something else in mind entirely, so
it is probably going to be necessary to answer the question: why?
Richard.