In our (quite large and old) ASP.NET application we use a lot of pages loaded into frames, iframes, and modal dialogs (using window.showModalDialog). We are starting to see the error above quite a bit, and I can't seem to find a single rational explanation for it anywhere.
Popup Blockers. Nope. We're not running them. Not even the built-in blocker.
Trusted Zone. Nope. The application runs on LocalHost right now, and it's in the trusted sites list.
Stray Cosmic Rays. Possible, but not probable. It's way too consistent.
I did eventually find the error message buried on Microsoft's site in some dusty tome about retrieving automation error message information. In it, they were talking about Excel, and they said: "In this example, Microsoft Excel is the server application. Referencing a workbook object once it is destroyed (or closed) generates the error."
That is probably as close as I've ever come to an explanation for the cause of the error, without a real, concrete explanation. Someone tried to use something after their reference to it was disposed of. Oddly, you can still see the windows on the screen. Curiously, however, this smacks suspiciously to me of the accepted answer to this.
So here's what happens.
- Page A is the main page.
- PageA displays PageB in a frame. PageB is a toolbar.
- PageA displays PageC in another frame. That's the content.
- PageC displays PageD in a nonmodal dialog.
- PageD, for reasons unknown to me, wants to modify the controls in PageB. It's trying to use window.opener to do that, and failing horribly.
If someone could enlighten me as to why this is the case (the code works in FF), I'd appreciate it.