I am new to js and wrote the following
<script type='text/javascript'>
function setIframeText() {
var iframe0 = document.getElementById('iframe0');
var iframe0document=iframe0.contentDocument||iframe0.contentWindow.document;
var cookieValue = getCookie('auf_name');
iframe0document.getElementById('jform_title').value = cookieValue;}</script>
So I have a HTML where I have an iframe with the id iframe0 and the textbox in the iframe hast the id jform_title. I want to set the value of the textbox in the iframe out from the parenty document, I tried it with my script and a button but it didn't work. It should change the value to the value of the cookie "auf_name".