Ok, I’m stuck, been googling for two days without figuring this out, fairly new to javascript too! so be gentle.
I have a page with two iFrames on it name and id set to iframe1 and iframe2
On iframe2 I have javascript function that I want to add some text to a textarea on iframe1, the function is running, but nothing is happening, the textarea is called ‘what’ and form is called ‘myform’. Heres what I’ve tried so far…
[CODE]
top.document.getElementById(‘iframe1’).getElementById(‘what’).value=’xxxxx’;
window.frames[‘iframe1’].document.getElementById(‘what’).value=”xyxyxyx”;
top.document.getElementById(‘iframe1’).document.forms[‘myform’].elements[‘what’].value=’Arrrggghh!’;
window.frames[0].document.forms[‘myform’].elements[‘what’].value=’why isnt this working!’;
(also tried [1] just in case)
Done variations on the above, but nothing appears, I used a firefox plugin to debug the javascript, and can confirm it is running the line.
Both iframes and the main page are all on the same domain, same web server, same folder.
GrumpyMode=True;