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.
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.
Share Improve this question edited Jan 22, 2009 at 11:23 sth 230k56 gold badges287 silver badges369 bronze badges asked Jan 22, 2009 at 11:04 sakthivelsakthivel4 Answers
Reset to default 4The "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
.
This is a known bug in IE 6. There may be various reasons for IE to abort operation.
Possible reasons could be:
- 3rd Party plugins installed in your browser (Disable it by going to IE > Tools > Internet Options > Advanced tab > Enable 3rd party browser extension )
- You are modifying the DOM node even before it is created. Try modifying the DOM Node after window.onDOMReady Event.
- As the bug says, you may be using the SmartNav feature in aspx pages. (Which i am not aware of)
The most mon 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.
No Error
<body>
<script type="text/javascript">
document.body.appendChild(document.createElement('div'))
</script>
</body>
Operation Aborted
<body>
<div>
<script type="text/javascript">
document.body.appendChild(document.createElement('div'))
</script>
</div>
</body>
Solution
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.
You can use script provided by IE Blog to investigate the problem. See: http://blogs.msdn./ie/archive/2009/09/03/preventing-operation-aborted-scenarios.aspx