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" --

var testwindow = ("", "mywindow",
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.