I'm a novice javascript programmer, but this sounds like it should be a simple task.
function cloneWindow() {
newWin = window.open ();
var elems = document.forms[0].elements;
for (var idx = 0; idx < elems.length; idx++) {
var newElem = elems[idx].cloneNode (true);
newWin.document.appendChild (newElem);
}
newWin.focus ();
}
Alternatively tryed
newElem = newWin.document.importNode (elems[idx], true);
The new document always return empty. So what very simple thing am I missing here?
Thanks in advance.
Scott!
function cloneWindow() {
newWin = window.open ();
var elems = document.forms[0].elements;
for (var idx = 0; idx < elems.length; idx++) {
var newElem = elems[idx].cloneNode (true);
newWin.document.appendChild (newElem);
}
newWin.focus ();
}
Alternatively tryed
newElem = newWin.document.importNode (elems[idx], true);
The new document always return empty. So what very simple thing am I missing here?
Thanks in advance.
Scott!