Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

window.frames['iframe'].location is undefined in firefox

  • 2 (ردّان اثنان)
  • 8 have this problem
  • 1 view
  • آخر ردّ كتبه Jigarp

more options

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...

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...

الحل المُختار

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)

more options

الحل المُختار

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>").
more options

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.