Identify parent element by id

I use this to identify and get the properties for the element with an id of 'elm1'
        var ed = tinyMCE.get('elm1');

How can I do this if the <div id="elm1"> is in a parent window?
LVL 16
hankknightAsked:
Who is Participating?
 
Xyptilon2Connect With a Mentor Commented:
try

var ed = parent.document.getElementById("elm1");

However, if within an iframe it wont work because "parent" is a window object, not a document object, and if it is from another domain you cannot do it due to security restrictions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.