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”; -Andrew Martinez -----Original
Message----- This should work:
var iFrame = document.createElement('IFRAME');
iFrame.src = '';
iFrame.contentWindow.document.open();
iFrame.contentWindow.document.write(sDocument);
iFrame.contentWindow.document.close(); Greg From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sam If I dynamically create a hidden iframe, how could I add a
document in a string to that element? e.g., var sDocument =
'<html><head></head><body>Hello
world.</body></html>'; I've tried several variations of appendChild, innerHTML, document.innerHTML,
createTextNode. Argh! |
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs