When you visit a Web page or you interact with a Web
application, you receive an Internet Explorer dialog box that contains the
following error message:
Internet Explorer cannot open
the Internet site http://<Web site>.com.
Operation aborted.
Back to the top
This problem occurs because a child container HTML element
contains script code that tries to modify the parent container element of the child container. The script code tries to modify the parent container element by using either the
innerHTML method or the
appendChild method.
Back to the top
To work around this problem, write script blocks that only
modify closed containers or that only modify the script's immediate container element. To do this, you can use a placeholder to close the target container, or you can move the script block into the container that you want to modify.
Back to the top
Example 1
In this example, the
DIV element is a child container element. The
SCRIPT block inside the
DIV element tries to modify the
BODY element. The
BODY element is the unclosed parent container of the
DIV element.
<html>
<body>
<div>
<script type="text/Javascript">
document.body.innerHTML+="sample text";
</script>
</div>
</body>
</html>To resolve this problem, use one of the following methods.
Method 1: Modify the parent element
Move the
SCRIPT block into the scope of the
BODY element. This is the container that the script is trying
to modify.
<html>
<body>
<div>
</div>
<script type="text/Javascript">
document.body.innerHTML+="sample text";
</script>
</body>
</html>
Method 2: Modify a closed container element
Add a closed container as a placeholder in the parent container
element. Then, modify the new closed container with a script block.
<html>
<body>
<div id="targetContainer">
</div>
<div>
<script type="text/Javascript">
document.getElementById('targetContainer').innerHTML+="sample text";
</script>
</div>
</body>
</html>
Back to the top
Example 2
In this example, a
SCRIPT block that is inside a deeply nested
TD container element tries to modify a parent container
BODY element by using the
appendChild method.
<html>
<body>
<table>
<tr>
<td>
<script type="text/Javascript">
var d = document.createElement('div');
document.body.appendChild(d);
</script>
</td>
</tr>
</table>
</body>
</html>
To resolve this problem, move the
SCRIPT block into the
BODY element.
<html>
<body>
<table>
<tr>
<td>
</td>
</tr>
</table>
<script type="text/Javascript">
var d = document.createElement('div');
document.body.appendChild(d);
</script>
</body>
</html>
Back to the top
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed in the "Applies to" section.
Back to the top
For example, this problem may occur if a
DIV element is a child container in a
BODY element, and a
SCRIPT block in the
DIV element tries to modify the
BODY element that is a parent container for the
DIV element. This is a bug in the Internet Explorer
parser.
Back to the top