Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

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

  • 2 antwoorden
  • 8 hebben dit probleem
  • 99 weergaven
  • Laatste antwoord van 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...

Gekozen oplossing

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>").
Dit antwoord in context lezen 👍 0

Alle antwoorden (2)

more options

Gekozen oplossing

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.