window.frames['iframe'].location is undefined in firefox
i m trying window.frames['iframe'].location , but i get the error that its undefined. Please tell me what is the exact solution or any alternate for this.
i want to reload the iframe page like window.frames['frame'].location.reload();
Its working fine in IE and chrome, only in firefox i get this problem. Plz Help on this...
Chosen solution
I think that window.frames[] only work with an index number and not with the frame name.
You can try to use one of these:
document.getElementsByName("<name>")[0]. document.querySelector('frame[name="<name>"]') document.getElementById("<id>").Read this answer in context 👍 0
All Replies (2)
Chosen Solution
I think that window.frames[] only work with an index number and not with the frame name.
You can try to use one of these:
document.getElementsByName("<name>")[0]. document.querySelector('frame[name="<name>"]') document.getElementById("<id>").
No...only in firefox there is problem i have checked window.frames[] with name in IE and chrome, thnx for the reply i will try these solutions.