Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to update child iFrame's entire html (header+body) inside jQuery's post
    text
    copied!<p>I have a chat webpage for Firefox that is structured like this</p> <p>..... Outer HTML</p> <p>-----|......Frameset Frame</p> <p>------------|...... header: contains jQuery post has returned data: rdata = new_iFrame_html_str, the entire html string of the iFrame that should be updated</p> <p>------------|...... iFrame</p> <p>--------------------|...... header: contains jQuery</p> <p>--------------------|...... body: chat messages that depends on the header jQuery to behave properly</p> <p>QUESTION: I can't this jQuery post to work, i.e. I can't find a way for this post to update the <em>ENTIRE</em> iFrame (header + body).</p> <p>Things I've tried and FAILED with javascript and jQuery:</p> <ol> <li>top.frames['framesetFrame_name'].document.getElementById('iframe_id').contentDocument.body.innerHTML = new_iFrame_html_str; <ul> <li>I don't like this because it's only changing the body, not the header, so the behavior generated from jQuery can't be shown <p></li> </ul></li> <li>top.frames['framesetFrame_name'].document.getElementById('iframe_bucinid').contentWindow.location.reload(); <ul> <li>I do <em>not want to reload</em> because a reload makes the iFrame flicker, bad for a chat program <p></li> </ul></li> <li>top.frames['framesetFrame_name'].document.getElementById('iframe_id').contents().html = new_iFrame_html_str; <ul> <li>Not updating anything that shows :( <p></li> </ul></li> <li>top.frames['framesetFrame_name'].document.getElementById('iframe_id').contentWindow.location.href = new_iFrame_html_str; <ul> <li>This is actually the wrong form here, because it should be = url_of_new_content <p></li> </ul></li> <li>$( top.frames['framesetFrame_name'].document.getElementById('iframe_id') ).html( new_iFrame_html_str ) ; <ul> <li>Not updating anything that shows :(</li> </ul></li> </ol>
 

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