Title: 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
Sent: Tuesday, June 27, 2006 2:43 PM
To: [email protected]
Subject: [Rails-spinoffs] 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 list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to