No I dont wan't to use this solution because :
- there are more than 1000 functions calling top.test function in more than 
50 differents iframes
- i can't edit some of them because there are hosted by clients

That's why I want to retrieve the window object in the test function.

I can retreive the caller's function and now i have to retrieve the calling 
function's window owner : 
function test(oRequest){
    var fCaller = test.caller;
    //recursive to find the first caller
    while(fCaller != null){
        if(fCaller.caller != null)fCaller = fCaller.caller;
        else{
            //fCaller is the fistr caller so i need to retrieve its owner 
(window) but how ?
            
            //End of the loop
            fCaller = null;
        }
    }
}

Le mercredi 21 mars 2012 15:05:21 UTC+1, hazlema a écrit :
>
> How about when they call the function have them call it with a arg that 
> points back to them.
>
> Like this:
> test(oRequest, this.getParent('iframe'));
>
> 

Reply via email to