Barış Velioğlu
Barış Velioğlu

Reputation: 5817

window.frames['myframe'] gives me an error in Firefox?

$(window.frames['myframe'].document.getElementById('frameid'))

This statement sometimes returns null in Firefox but working properly in any other browsers. What can be the problem ?

Thanks in advance,

Upvotes: 0

Views: 303

Answers (1)

AbstractChaos
AbstractChaos

Reputation: 4211

By the looks of it you simply need to change the selector it should be

$('#myframe').contents().find('#frameid').html();

JQuery handles the finding of it, take a look at selectors in jQuery Selectors

Upvotes: 2

Related Questions