Y
yawnmoth
When I visit the following webpage:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test</title>
</head>
<body>
<div id="demo">this is a test...</div>
<script>
result = document.createElement("span");
result.style.color = "#f00";
result.style.fontWeight = "bold";
result.appendChild(document.createTextNode(" ...that has been a
success"));
var demo = document.getElementById("demo");
demo.parentNode.replaceChild(demo,result);
</script>
</body>
I get this error (in FF2):
uncaught exception: [Exception... "Node was not found" code: "8"
nsresult: "0x80530008
(NS_ERROR_DOM_NOT_FOUND_ERR)" location:
"http://www.domain.tld/test.html Line: 17"]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test</title>
</head>
<body>
<div id="demo">this is a test...</div>
<script>
result = document.createElement("span");
result.style.color = "#f00";
result.style.fontWeight = "bold";
result.appendChild(document.createTextNode(" ...that has been a
success"));
var demo = document.getElementById("demo");
demo.parentNode.replaceChild(demo,result);
</script>
</body>
I get this error (in FF2):
uncaught exception: [Exception... "Node was not found" code: "8"
nsresult: "0x80530008
(NS_ERROR_DOM_NOT_FOUND_ERR)" location:
"http://www.domain.tld/test.html Line: 17"]