Insert html into window

how do I insert html into a window? This doesn’t seem to work:

var testwindow = window.open ("", “mywindow”,
“height=800,width=400,location=no,scrollbars=yes”);
var el = testwindow.document.createElement(‘div’);
el.innerHTML = content;

On Mon, Apr 19, 2010 at 7:32 AM, ES [email protected] wrote:

how do I insert html into a window? This doesn’t seem to work:

You have four problems here:

  1. this is a Rails mailing list – find a JavaScript list for this
    question
  2. “doesn’t seem to work” –
    How To Ask Questions The Smart Way

var testwindow = window.open (“”, “mywindow”,
“height=800,width=400,location=no,scrollbars=yes”);
var el = testwindow.document.createElement(‘div’);

  1. creating an element doesn’t insert it into the DOM

el.innerHTML = content;

  1. content is apparently undefined.

HTH,

Hassan S. ------------------------ [email protected]
twitter: @hassan