Ökii
03-31-2004, 09:22 AM
Hi All, long time no see.
The problems I am having are with trying to get IE to successfully clone a referenced node from one frame and inport it (with all form values etc) to another frame.
Moz works fine with
oFilters = document.getElementById('saveElement');
oFilters.appendChild(parent.frames[frameref].document.getElementById('e_'+elemref).cloneNode(1));
I have tried iterating the specified node and using createElement to create a copy in the desired place, which works fine with simple input type text or hidden. The first snag comes when trying the same with textareas. The cloned form doesn't submit the values :(
Any ideas?
Sample IE function - works for basic inputs
function portNode (oNode) {
oElems = document.getElementById('saveElement');
switch (oNode.nodeName) {
case 'INPUT':
oIn = document.createElement("input");
oIn.setAttribute("type", "hidden");
oIn.setAttribute("value", oNode.value);
oIn.setAttribute("name", oNode.name);
oElems.appendChild(oIn);
break;
case 'TEXTAREA':
break;
default:
break;
}
for (var oChild = oNode.firstChild; oChild; oChild = oChild.nextSibling) {
portNode(oChild);
}
}
The problems I am having are with trying to get IE to successfully clone a referenced node from one frame and inport it (with all form values etc) to another frame.
Moz works fine with
oFilters = document.getElementById('saveElement');
oFilters.appendChild(parent.frames[frameref].document.getElementById('e_'+elemref).cloneNode(1));
I have tried iterating the specified node and using createElement to create a copy in the desired place, which works fine with simple input type text or hidden. The first snag comes when trying the same with textareas. The cloned form doesn't submit the values :(
Any ideas?
Sample IE function - works for basic inputs
function portNode (oNode) {
oElems = document.getElementById('saveElement');
switch (oNode.nodeName) {
case 'INPUT':
oIn = document.createElement("input");
oIn.setAttribute("type", "hidden");
oIn.setAttribute("value", oNode.value);
oIn.setAttribute("name", oNode.name);
oElems.appendChild(oIn);
break;
case 'TEXTAREA':
break;
default:
break;
}
for (var oChild = oNode.firstChild; oChild; oChild = oChild.nextSibling) {
portNode(oChild);
}
}