I have an iframe, it links to an HTML file that has a div that can be edited, I am trying to add content to that div, though all that I have tried hasn't worked.
Here is the iframe:
<div><div id="testing" contenteditable></div></div>
Of course, there is more in the HTML file the iframe displays, but the rest isn't important. So here is the code that I've tried:
function timpin() {
var iframe = document.getElementById("textField");
var elmnt = iframe.contentWindow.document.getElementById("testing");
elmnt.innerHTML += "timpin ";
}
I do believe that it should work, but it isn't and I can't find out why.