I want to insert text pragmatically in to the text area not in my page. I have loaded a page via iframe
and loaded page has textarea
.and this 2 pages have different domains not same. I want to paste a text to it. Actually I want to add text no matter paste or type or what ever text should appear in text-area.i can manually click textarea and focus it ,but insert text pragmatically I have added a picture for proper understand. I not sure about possibility. But if impossible are there any alternative ways to achieve this.
this is java-script code i tried
function incert_text() {
var x = document.getElementById("myframe");
var y = (x.contentWindow || x.contentDocument);
if (y.document)y = y.document;
y.document.getElementById("textarea").value="this is incerted text";
}