I would like to manipulate the html inside an iframe using jquery -


i thought i'd able setting context of jquery function document of iframe, like:

$(function(){//document ready $('some selector', frames['nameofmyiframe'].document).dostuff() }); 

however doesn't seem work. bit of inspection shows me variables in frames['nameofmyiframe'] undefined unless wait while iframe load. however, when iframe loads variables not accessible (i permission denied type errors).

does know of way work around this?

the "workaround", if can't make other site include relevant cors headers, fetch iframe content server side , serve coming own domain.

the reason there isn't simpler workaround due why there same origin policy : protect users.

you can not perform access cross domain iframe


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -