In my project, there is a WebBrowser Control in a form. It opens a webpage dynamically which in-turn opens an IE popup using Window.Open() during OnLoad and this window closes after opening the popup.
This is the functionality and it worked fine since last 8 months with IE6 and and IE7. But, now when I am doing the same with IE8 on Windows XP, I got a JS Error and that MessageBox showed me the error as:
Line: 1Char: 1Error: Could not complete the operation due to error 800704a6.
As usual, started googling about the topic and found some interesting links. Here is a consolidated work-arounds for the problem from various sources.
First of all, it really matters what mode you are in. In IE8, there are 3 (THREE) modes.
- IE5 Quirks – your page has no doctype, page renders like IE5 did
- IE 7 Standards Mode – you have a doctype, but either opted out of IE8 standards mode, or are running on localhost, or in “Compatibility Mode”
- IE 8 Standards Mode – you have a doctype, and are on the INTRANET (default mode)
Now, if you are rendering in IE5/IE7 mode, then Nothing changes except that there will be a few methods added that shouldn’t interfere with your page.
However, if like the majority, you are running with a doctype set, and thus in IE8 Standards mode, the following changes have occurred.
- document.getElementById( id ); //now only returns the CORRECT matches!
- .getElementsByName( name ); //now only returns the CORRECT matches!
- .getAttribute( name ); //returns the CORRECT value for the given attribute!
- .setAttribute( name, value ); //actually SETS the name/value CORRECTLY (no more cAmElCaSe crud)!
- CSS Expressions are NO LONGER allowed (deprecated)
- Operation Aborted errors will still be thrown (in some cases) however the cases are fewer, and the error won’t kill the entire page/DOM
- The attributes array on elements should (from the RC build onwards) be correct in terms of contents, have a length, etc.
- Button elements now submit the contents of the value attribute, NOT the HTML contents of the Button Tag
There has also been a bunch of CSS 2.1 fixes, so things that rendered weird before, or needed hacks, should be much better. (see below for details on alpha/transparency – there’s been big changes)
See the IE Blog for details.
Also see Web Bug Track for fine grained details on Bugs, Fixes for IE8 (and all other browsers)
SVG, rounded corners, ECMAScript based Event Listeners, Better Form Element design/events etc. are still missing.
A quick work-around is as follows. (If the problem is with security settings, we can get an instant solution by setting up the following values)
Go to Tools-> Internet Options-> Security and click on ‘Custom Level…’ (in the Security level for this zone group)
Under the Miscellaneous section:
Use Pop-up Blocker (disable)
Under the Scripting section:
Active Scripting (enable)
Allow status bar updates via script (enable)
Allow Websites to Prompt for infomation… (Enable)
Enable XSS filter (Enable)
Under the section User Authentication:
Logon (Anonymous logon)
Or else we can try by unchecking the Enable Protected Mode from the following window.
Menu Tools -> Internet Options -> Security -> Internet -> Enable Protected Mode (Uncheck it)
If you are aware of any other work-arounds please let us know by posting in the comments section.
Hope this helps.