Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the "Operation Aborted" error in Internet Explorer?

I recently added JQuery's date-picker control to a project. In Internet Exploder, I get the following error message:

Internet Explorer cannot open the Internet site

http://localhost/

Operation aborted

What is causing this problem?

like image 366
Ryan Smith Avatar asked Nov 05 '08 23:11

Ryan Smith


4 Answers

There was a related question earlier today:

Operation Aborted Error in IE

This is a common problem.

It occurs in IE when a script tries to modify the DOM before the page is finished loading.

Take a look at what sort of scripts are executing. You'll find that something is getting started before the page is finished loading. You can use the window.onload event to correct the problem (or one of the onDomReady library functions).

like image 131
keparo Avatar answered Nov 15 '22 19:11

keparo


Just elaborating Keparo's answer.

You can put your script inside one of the following functions(as per the library you are using) and that will resolve the issue.

prototype.js:
document.observe(’dom:loaded’, function () { /* your script goes here */ }),

jquery:
jQuery(document).ready(function () { /* your script goes here */ })

mootools:
document.addEvent(’domloaded’, function () { /* your script goes here */ })
like image 34
user194485 Avatar answered Nov 15 '22 19:11

user194485


Found this possibly related blog post: http://blogs.msdn.com/ie/archive/2008/04/23/what-happened-to-operation-aborted.aspx

Or this: http://weblogs.asp.net/infinitiesloop/archive/2006/11/02/Dealing-with-IE-_2600_quot_3B00_Operation-Aborted_2600_quot_3B002E00_-Or_2C00_-how-to-Crash-IE.aspx

Seems to be pretty common

like image 39
John Sheehan Avatar answered Nov 15 '22 17:11

John Sheehan


I was able to fix this problem on a few pages I was having trouble with today.

If you have JavaScript that modified the DOM anywhere within the body of the page, try moving it below the </body> tag.

Example:

Change

...
<script>highlightSearchTerms();</script>
</body>
</html>

To

...
</body>
<script>highlightSearchTerms();</script>
</html>
like image 21
Travis Avatar answered Nov 15 '22 19:11

Travis