[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Identify parent element by id

Posted on 2008-11-17
1
Medium Priority
?
225 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:hankknight
1 Comment
 
LVL 13

Accepted Solution

by:
Xyptilon2 earned 2000 total points
ID: 22977553
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question