Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 938303 - Last Review: July 20, 2007 - Revision: 1.0
Internet Explorer stops responding when you use the AttachEvent method in an ASP.NET application to embed a Microsoft Office Web Components spreadsheet control in Internet Explorer 6
You use the
AttachEvent method in a Microsoft ASP.NET application. You try to use this method to embed a Microsoft Office Web Components spreadsheet control in Microsoft Internet Explorer 6. When you do this, Internet Explorer stops responding. When you try to close Internet Explorer or when you click a button in the application, Internet Explorer stops unexpectedly. Additionally, you receive the following error message:
Internet Explorer has encountered a problem with an add-on and needs to close.
The following add-on was running when the problem occurred:
File: owc11.dll
Company Name: Microsoft Corporation
Description: Microsoft Office Web Components 2003
Learn more about add-ons.
When you click
Continue to close the error message, you receive the following error message:
Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience.
If you were in the middle of something, the information you where working on might be lost.
Please tell Microsoft about this problem!
We have created an error report that you can send to help us to improve
Internet Explorer. We will treat this report as confidential and anonymous.
To see what data this report contains click here.
Note This problem does not occur when you use Windows Internet Explorer 7.
This problem occurs because of behavior that occurs when you use the
AttachEvent method. When you do this, the interface pointer that is referenced by the spreadsheet control may be released before the control is completely shut down. When this problem occurs, Internet Explorer cannot release the pointer after the pointer has already been released. For example, this problem occurs when you use code that resembles the following example.
<script type="text/javascript">
function onSheetChange (Sh, Target)
{
alert ('R' + Target.Row + 'C' + Target.Column + ' changed to: ' + Target.Value);
}
document.getElementById('SpreadSheet1').attachEvent('sheetchange', onSheetChange);
</script>
To resolve this problem, use attributes instead of events in the code for the application. Then, try running the application again. For example, use code that resembles the following code example.
<script type="text/javascript" for="SpreadSheet1" event="sheetchange(sh,Target)">
alert ('R' + Target.Row + 'C' + Target.Column + ' changed to: ' + Target.Value);
</script>
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
APPLIES TO
- Microsoft Internet Explorer 6.0
| kbexpertiseadvanced kbtshoot kberrmsg kbbug kbprb KB938303 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate