• Home
  • About
    • BI, Workflow Automation, and App Development
    • Login
  • Search
dForge.net
Soguecode.ioTwitterGitHubCodepen
 
Skip to content
  • Home
  • About
    • BI, Workflow Automation, and App Development
    • Login
  • Search
Home Posts tagged "iframe"

Tag: iframe

Development

Accessing the JSON Object Within an IFrame

By Ron S. March 22, 2013 March 22, 2013  iframe, javascript, json 0

For some reason in IE8, I couldn’t access the built-in JSON global object in Javascript within an iframe. I’m not sure if this issue exists in other browsers, but the fix is to specify the top property first, and then the JSON object: top.JSON.stringify(({json: ‘object’})) See jquery.com

Continue reading"Accessing the JSON Object Within an IFrame"
Development

How to Invoke JS Within an iFrame

By Ron S. August 5, 2012 August 5, 2012  iframe, javascript, jquery 0

If you need to access HTML elements or Javascript code within an iFrame, here’s how to do it: var cw = document.getElementById(‘theIFrameID’).contentWindow; cw.document.body.style.backgroundColor = ‘#f00’ Have jQuery in the iFrame? You can access it this way: alert(cw.$(‘body’).html());

Continue reading"How to Invoke JS Within an iFrame"
Back to Top
@ 2017 Soguecode.io, LLC.
Powered by Fluida & WordPress.