Salve, scusate ma a me prorpio non funziona!!!!! Le sto provando tutte e sto impazzendo.....
questo è il mio codice:
// Pagina HTML
codice:
...
<iFrame id="dataBox" src="file.html"></iFrame>
...
// pagina file.html
codice:
<body>
<form>
<textarea id="datas">
....
</textarea>
....
codice javascript
codice:
var val = document.getElementById('dataBox').contentWindow.document.getElementById('datas').value;
ma non funziona, ho prvato anche:
codice:
val = window.frames["dataBox"].document.childNodes[0].getElementsByTagName("textarea")[0];
val = window.frames["dataBox"].document.getElementById("datas");
val = window.frames["dataBox"].document.childNodes[0].childNodes[1].nodeValue;
var val = window.frames[0].contentDocument.getElementById("datas");