[Greasemonkey] accessing sub frames

Vectorspace vectorspace at ntlworld.com
Wed Apr 12 23:23:18 EDT 2006


Yes, I just worked that out. That is what I was trying before, but in 
test page I made to experiment with the sub frame I was trying to access 
was from a different domain - cross-domain scripting isn't allowed.

I need to build an array of document objects for all accessible sub 
frames. That I can do. But at the moment my script doesn't know how to 
check to see if a frame is accessible. Error catching is new to me, but 
I'm working on it

Thanks for your help

Dave Land wrote:
> On Apr 12, 2006, at 11:15 AM, Vectorspace wrote:
>
>> I can access the dom of a sub frame using frames[i] or 
>> document.getElementsByTagName("frame")[i].contentDocument but neither 
>> allows me to go another level down in the frame tree. What is the 
>> best way of accessing the sub frames of a page, and their sub frames, 
>> and their sub frames, and so on? I'd like to go down 3-4 levels.
>
> It would look something like this:
>
> frames[i].frames[j].frames[k].frames[l]
>
> Dave
>
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>


More information about the Greasemonkey mailing list