I want to get body element 'tinymce' which positioned inside iframes as the tree shown below..
html -> body -> div#wpwrap -> div#wpcontent -> div#wp-content -> div#wrap -> form#post -> div#editorcondainer -> div#poststuff -> div#post-body -> div#post-body-content -> div#postdivrich -> div#editiorcontainer -> span#content_parent -> table#content_tbl.mceLayout -> tbody -> tr -> td.mceIframeContainer.mceFirst.mceLast -> iframe#content_ifr -> html -> body#tinymce.mceContentBody
For that i uses the code :
var iframeEl = document.getElementById('content_ifr');
alert(iframeEl);
if ( iframeEl.contentDocument ) { // DOM
var bdy = iframeEl.contentDocument.getElementById('tinymce');
} else if ( iframeEl.contentWindow ) { // IE win
var bdy = iframeEl.contentWindow.document.getElementById('tinymce');
}
But iframeE1 is null :(
Im trying other ids in the tree but it stop returning elements from the 'span id :content_parent', the last id returning object is 'div id :editorcontainer'
How could i get the elements after 'span id :content_parent'