bjornrud
02-21-2005, 03:56 PM
Hey everyone, I'm at wits end. The following code works as expected in Firefox but IE says "No such interface suppported"
Basically, the first codeblock is a parent window to the second codeblock which is supposed to send two nodes back to the parent and display them. Any help would be GREATLY appreciated.
Edit: I almost forgot. I found this thread before
http://www.codingforums.com/showthread.php?t=51978&highlight=No+such+interface+supported
but adding .cloneNode(true) didn't fix the problem. Am I using it wrong?
<html>
<head>
<title>parent DOM test</title>
<SCRIPT language="Javascript1.1">
function insertPassed(arrayOfNodes){
targetDiv = document.getElementById('childTarget'); //cloneNode didn't help here.
for(i=0; i < arrayOfNodes.length; i++){
foolProof = arrayOfNodes[i].cloneNode(true);
targetDiv.appendChild(foolProof); //"No such interface supported" error here in IE
}
}
</SCRIPT>
</head>
<body>
<div id="childTarget"><a href="#" onclick="window.open('test.php','');">popup</a>
</div>
</body>
</html>
<html>
<head>
<title>child DOM test</title>
<script language="Javascript1.1">
function copyInsert(){
meat1 = document.getElementById('a3').cloneNode(true);
meat2 = document.getElementById('a5').cloneNode(true);
toSend = [meat1, meat2];
opener.insertPassed(toSend);
}
</script>
</head>
<body>
<div class="takefromme">
<div class="record" id="a3">
<input type="checkbox" name="records[]" value="3">
<div class="id">
<div class="rLabel" >ID</div>
<div class="rValue">3</div>
</div>
<div class="pbd">
<div class="rLabel" >name</div>
<div class="rValue">Tor</div>
</div>
<div class="altText">
<div class="rLabel" >Alt Text</div>
<div class="rValue">fooo moo</div>
</div>
<div class="name">
<div class="rLabel" >color</div>
<div class="rValue">blue</div>
</div>
</div>
<div class="record" id="a5">
<input type="checkbox" name="records[]" value="5">
<div class="id">
<div class="rLabel" >ID</div>
<div class="rValue">5</div>
</div>
<div class="pbd">
<div class="rLabel" >name</div>
<div class="rValue">Tor5</div>
</div>
<div class="altText">
<div class="rLabel" >Alt Text</div>
<div class="rValue">foo</div>
</div>
<div class="name">
<div class="rLabel" >color</div>
<div class="rValue">red</div>
</div>
</div>
<div class="record" id="a9">
<input type="checkbox" name="records[]" value="9">
<div class="id">
<div class="rLabel" >ID</div>
<div class="rValue">9</div>
</div>
<div class="pbd">
<div class="rLabel" >name</div>
<div class="rValue">Ryan</div>
</div>
<div class="altText">
<div class="rLabel" >Alt Text</div>
<div class="rValue">flowers</div>
</div>
<div class="name">
<div class="rLabel" >color</div>
<div class="rValue">pink</div>
</div>
</div>
</div>
<button onclick="copyInsert();"> Hit me! </button>
</body>
</html>
Basically, the first codeblock is a parent window to the second codeblock which is supposed to send two nodes back to the parent and display them. Any help would be GREATLY appreciated.
Edit: I almost forgot. I found this thread before
http://www.codingforums.com/showthread.php?t=51978&highlight=No+such+interface+supported
but adding .cloneNode(true) didn't fix the problem. Am I using it wrong?
<html>
<head>
<title>parent DOM test</title>
<SCRIPT language="Javascript1.1">
function insertPassed(arrayOfNodes){
targetDiv = document.getElementById('childTarget'); //cloneNode didn't help here.
for(i=0; i < arrayOfNodes.length; i++){
foolProof = arrayOfNodes[i].cloneNode(true);
targetDiv.appendChild(foolProof); //"No such interface supported" error here in IE
}
}
</SCRIPT>
</head>
<body>
<div id="childTarget"><a href="#" onclick="window.open('test.php','');">popup</a>
</div>
</body>
</html>
<html>
<head>
<title>child DOM test</title>
<script language="Javascript1.1">
function copyInsert(){
meat1 = document.getElementById('a3').cloneNode(true);
meat2 = document.getElementById('a5').cloneNode(true);
toSend = [meat1, meat2];
opener.insertPassed(toSend);
}
</script>
</head>
<body>
<div class="takefromme">
<div class="record" id="a3">
<input type="checkbox" name="records[]" value="3">
<div class="id">
<div class="rLabel" >ID</div>
<div class="rValue">3</div>
</div>
<div class="pbd">
<div class="rLabel" >name</div>
<div class="rValue">Tor</div>
</div>
<div class="altText">
<div class="rLabel" >Alt Text</div>
<div class="rValue">fooo moo</div>
</div>
<div class="name">
<div class="rLabel" >color</div>
<div class="rValue">blue</div>
</div>
</div>
<div class="record" id="a5">
<input type="checkbox" name="records[]" value="5">
<div class="id">
<div class="rLabel" >ID</div>
<div class="rValue">5</div>
</div>
<div class="pbd">
<div class="rLabel" >name</div>
<div class="rValue">Tor5</div>
</div>
<div class="altText">
<div class="rLabel" >Alt Text</div>
<div class="rValue">foo</div>
</div>
<div class="name">
<div class="rLabel" >color</div>
<div class="rValue">red</div>
</div>
</div>
<div class="record" id="a9">
<input type="checkbox" name="records[]" value="9">
<div class="id">
<div class="rLabel" >ID</div>
<div class="rValue">9</div>
</div>
<div class="pbd">
<div class="rLabel" >name</div>
<div class="rValue">Ryan</div>
</div>
<div class="altText">
<div class="rLabel" >Alt Text</div>
<div class="rValue">flowers</div>
</div>
<div class="name">
<div class="rLabel" >color</div>
<div class="rValue">pink</div>
</div>
</div>
</div>
<button onclick="copyInsert();"> Hit me! </button>
</body>
</html>