I\'ve searched an answer to this question but can\'t get a way how to do it.
I want to access the content of a div that I have included in an object tag.
My
Got it! Just use
window.parent.mainPageMethod(document.getElementById("includedDiv").firstChild.nodeValue);
in the included page and you can get div content in a Javascript function from the main page!
Thanks for trying to help Jay, I should admit that when you talked about window.name property it put me on the right direction :)
Even better answer: you CAN access object tag content through the DOM, it is just another window!
window[0].document.getElementById("includedDiv").firstChild.nodeValue;
That's it :D http://www.w3schools.com/jsref/prop_win_length.asp
document.getElementById('id').innerHTML
or document.getElementById('id').outerHTML
whichever you are looking for...
see how to append to a object with innerHTML