insert html into window

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');

3) creating an element doesn't insert it into the DOM

el.innerHTML = content;

4) content is apparently undefined.

HTH,