Wednesday, March 12, 2008

BUG: Error message when you visit a Web page or interact with a Web application in Internet Explorer: "Operation aborted"

·

BUG: Error message when you visit a Web page or interact with a Web application in Internet Explorer: "Operation aborted"

APPLIES TO

Microsoft Internet Explorer 5.5

Microsoft Internet Explorer 6.0

Windows Internet Explorer 7


 

On This Page

SYMPTOMS

CAUSE

WORKAROUND

Example 1

Method 1: Modify the parent element

Method 2: Modify a closed container element

Example 2

STATUS

MORE INFORMATION

SYMPTOMS

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

CAUSE

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

WORKAROUND

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

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

Back to the top

MORE INFORMATION

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.


 

0 comments:

Post a Comment

Related Articles


Related Article Widget by Hoctro

About Me


嗨,我是花,居住在印度兴奋的Windows,Linux中国的外籍人士和所有高科技的东西

Hi, I am Hua, a chinese expat residing in India excited about windows, linux and all things tech

Receive updates for free

Enter your email address:

Delivered by FeedBurner

Mobile Version

Bookmark

Bookmark and Share

Blog Archive