Connecting Tech Pros Worldwide Forums | Help | Site Map

Access to FRAMESET

Newbie
 
Join Date: Oct 2007
Posts: 7
#1: Dec 12 '07
I have given an id to a frameset tag but find I can not get access to it from a frame when using -

parent.document.getElementById(myName)

If I use -

parent.document.getElementsByTagName('framset')[0]

I get [object HTMLFrameSetElement] returned, so assume the DOM is seeing the frameset tag.

Can anyone suggest how I can use the Id method to get into the frameset tag??

Many thanks

Dasty's Avatar
Expert
 
Join Date: Nov 2007
Location: Slovakia
Posts: 101
#2: Dec 12 '07

re: Access to FRAMESET


Expand|Select|Wrap|Line Numbers
  1. parent.document.getElementById(myId).contentWindow.document
is document in frame

but dont forget that you got access to frame's document just in case that both sites are from the same domain
Newbie
 
Join Date: Oct 2007
Posts: 7
#3: Dec 12 '07

re: Access to FRAMESET


Tried your suggestion:-
Expand|Select|Wrap|Line Numbers
  1. parent.document.getElementById(myId).contentWindow.document
in both Firefox and IE, and it failed.
using
Expand|Select|Wrap|Line Numbers
  1. parent.document.getElementById(myId).contentWindow
returned 'undefined'.

I am trying to acces the FRAMESET from a FRAME of which FRAMESET is the parent.

Thanks
Reply