Displaying 2 results from an estimated 2 matches for "sdocument".
Did you mean:
document
2006 Jun 27
14
iframe ... does it have an innerHTML ?
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 lis...
2006 Jun 29
3
dynamic generation of iframes and writing to them
...hile the page is loading
- Capture the response by overwriting default document.write() because otherwise it would open a new output stream.
adContainer = "";
document.write = function(text){
adContainer += text;
};
- Then dynamically create the iframe -
function generateIframe(iframeId, sDocument) {
var tFrame = document.getElementById(iframeId);
var doc = tFrame.contentDocument;
if (doc == undefined || doc == null)
doc = tFrame.contentWindow.document;
doc.open();
doc.write(sDocument);
doc.close();
}
setTimeout("generateIframe(''Left'', adContainer)", 500);
Now,...