800704a6 Error while opening JavaScript driven pages in IE8 – Work arounds

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: 1
Char: 1
Error: 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.

  1. document.getElementById( id ); //now only returns the CORRECT matches!
  2. .getElementsByName( name ); //now only returns the CORRECT matches!
  3. .getAttribute( name ); //returns the CORRECT value for the given attribute!
  4. .setAttribute( name, value ); //actually SETS the name/value CORRECTLY (no more cAmElCaSe crud)!
  5. CSS Expressions are NO LONGER allowed (deprecated)
  6. 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
  7. The attributes[] array on elements should (from the RC build onwards) be correct in terms of contents, have a length, etc.
  8. 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.
Thank you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s