It sounds like you answered your own question in your response email…but
I will respond just because there is another question you ask that you didn’t
already answer yourself. Using document.write post-load does not fire an onload. It just resets
the document’s text/html. A simple test: An IFRAME is just a nested window context, with some quirks. So, opening
a new window is just like an IFRAME. Lets go to www.google.com In the URL/address bar, clear any text there. Type: _javascript_:document.write(‘omg where did
google go’ ); Press enter. No onload, but google is now gone! -Andrew Martinez -----Original
Message----- Important to remember that using
document.open/close/write from _javascript_ during non-loading period will cause
the current document context to reset, meaning you lose what was previously
there. -
var iFrame = document.createElement(‘IFRAME’); -
iFrame.src = "" //pretty sure you don’t need this -
iFrame.contentWindow.document.body.innerHTML = “blarrrrrrr”; -
iFrame.contentWindow.document.body.innerHTML += “more BLARRRRRRRRR”; resetting
the context of the enclosing body? This means reloading an iframe
will ... fire a body onload event or what? are you
sure it doesn't reset the context of the iframe alone? (hopeful look) <take
a moment to ready what was actually written>
.. so using innerHTML avoids the context reset altogether... thanks </> Sam |
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs