Reputation:
Hi friends i design a page for my project. In that I display data from database.
The problem is that it displays the data, but then a message box appears stating:
Internet explorer cannot open the internet site 'http://localhost/....' operation aborted
Please help me to fix this problem.
Upvotes: 2
Views: 8562
Reputation: 506
You can use script provided by IE Blog to investigate the problem. See: http://blogs.msdn.com/ie/archive/2009/09/03/preventing-operation-aborted-scenarios.aspx
Upvotes: 1
Reputation: 16958
The most common code causing this problem (KB927917) is appending to the body element from a script that is not a direct child to the body element. To put it another way , writing to the body element from grandchild nodes throws this error.
<body>
<script type="text/javascript">
document.body.appendChild(document.createElement('div'))
</script>
</body>
<body>
<div>
<script type="text/javascript">
document.body.appendChild(document.createElement('div'))
</script>
</div>
</body>
Create an element that you can write to that is closed.
<body>
<div><!-- add content to me instead of appending to the body --></div>
<div>
<script type="text/javascript">
document.getElementsByTagName('div')[0].appendChild(document.createElement('div'))
</script>
</div>
</div>
You can programmatically create that div as well.
Upvotes: 1
Reputation: 2854
This is a known bug in IE 6. There may be various reasons for IE to abort operation.
Possible reasons could be:
Upvotes: 1
Reputation: 321864
The "operation aborted" message often happens in IE when you're using javascript and you try to modify an element before it has finished loading.
If possible, delay running your script until onload
.
Upvotes: 4