Note that there are some explanatory texts on larger screens.

plurals
  1. POQuestion - Setting dynamic HTML using Javascript to iFrames on Windows Mobile 6.1 - IE Mobile6
    primarykey
    data
    text
    <p>(excuse me if this is not the right forum to post - i couldn't find anything related to non-native programming and related to this topic)</p> <p>I Am trying to set a dynamic HTML into an iFrame on the webpage. I have tried a couple of things but none of them seem to work. I m able to read the innerHTML but can't seem to update it.</p> <pre><code>// Able to read using document.getElementById('iFrameIdentifier').innerHTML; // On Desktop IE, this code works document.getElementById('iFrameId').contentWindow.document.open(); document.getElementById('iFrameId').contentWindow.document.write(dynamicHTML); document.getElementById('iFrameId').contentWindow.document.close(); </code></pre> <p>Ideally the same function should work as how it works for div's but it says 'Object doesn't support this method or property".</p> <p>I have also tried document.getElementById('iFrameId').document.body.innerHTML.</p> <p>This apparently replaces the whole HTML of the page and not just the innerHTML.</p> <p>I have tried out a couple of things and they didn't work</p> <ul> <li>document.getElementById('iFrameId').body.innerHTML</li> <li>document.frames[0].document.body.innerHTML</li> </ul> <p>My purpose is to have a container element which can contain dynamic HTML that's set to it.</p> <p>I've been using it well till now when I observed that the setting innerHTML on a div is taking increasing amount of time because of the onClicks or other JS methods that are attached to the anchors and images in the dynamic HTML. Appears the JS methods or the HTML is some how not getting cleaned up properly (memory leak?)</p> <p>Also being discussed - <a href="http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_26185526.html#a32779090" rel="nofollow noreferrer">http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_26185526.html#a32779090</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload