Tags

,

Background:
When developing web pages especially those that are JavaScript-intensive (Web 2.0 sites) I usually start using Mozilla Firefox because of its excellent support for JavaScript “troubleshooting.” So finally when everything seems to be up and running I try it out on Internet Explorer, applying IE-specific tweaks to CSS and JavaScript.

Symptoms:
So there it is your “completed” page ready for IE testing, and then this error happen: “Operation Aborted.”

You then try to think what went wrong, what kind of script have you made to have caused such a trivial error?

Fix:
Your script has nothing to do with it!  The actual fault is that your script tag is probably located inside a table cell, e.g.

<table>
    <tr>
        <td>
            <script type="text/javascript">
               
var
div = document.createElement(‘div’);
               
document.body.appendChild(div);

            <
script>
        </td>
    </tr>
</
table>
 

Logically and syntactically the above code is valid but when you try to run it in IE it will produce the “Operation Aborted” error.  To fix this error make sure that your script is outside any table cell.  There are times that it is inevitably inherited possibly from a master page (asp.net) or page template but you may want to consider placing your script tag inside the head tag (recommended) or at the very least as the last child node of the body (i.e., the script tag’s immediate parent node is the body tag).



<
head>

<script type="text/javascript">

</script>
</head>

 

or




<
body>

<script type="text/javascript">

</script>
</body>
 

Advertisements