Skip to content

Instantly share code, notes, and snippets.

@lslucas
Created January 18, 2012 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lslucas/1635075 to your computer and use it in GitHub Desktop.
Save lslucas/1635075 to your computer and use it in GitHub Desktop.
Execute (outside iframe) javascript function (inside iframe)
#vc dentro de Iframeid
parent.document.getElementById("IframeId");
#vc fora dos iframes tentando chamar uma funcão javascript que está dentro de um iframe
document.getElementById("IframeId").contentWindow.HelloWorld();
#pegar conteúdo do iframe
var iframe = parent.document.getElementById( "iframeReport");
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment