Saturday, March 1, 2008

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

My friend just faced this problem recently. He develops a page. It works very well on FF, but when it opens on IE6. The internal error message from IE said that "Operation aborted". Now it is fixed due to the solution/workaround in this http://support.microsoft.com/kb/927917/en-us.

This is a bug in IE 6 that has been reviewed lastly on October 27, 2007. The problem is that 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.

<html>
<body>
<div>
<script type="text/Javascript">
document.body.innerHTML+="sample text";
</script>
</div>
</body>
</html>


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.

For more information, go to http://support.microsoft.com/kb/927917/en-us

No comments:

Subscribe in a Reader