so, I have 2 frames and want to access to element from one frame into another :
frame 1:
<div id='someId'>...</div>
frame 2:
var div=document.getElementById('someId');
div.innerHTML='something';
this is somehow not functioning in Firefox so I want to be sure, can I access to element in another frame by its ID ?
You can refer the other frame by using
and then you can refer the element in the DOM by using
Or, if you feel like trying your luck, you can just use a numeric parameter.
window.frames[0].document
I was having problem with the JS version but was able to use these examples for a working jQuery version:
The issue may be the current frame you are in. If
window.frames['framename']
does not work, tryparent.frames['framename']
to access the top level frames.