Categories
Internet Explorer Solutions Web

How to force Internet Explorer to view a page in a specific version mode.

Internet Explorer 7
Internet Explorer 7 (Photo credit: Wikipedia)

Meta tags can be used to force Internet Explorer(IE) browser to use a specific standards mode. The X-UA-Compatible meta tag tells IE what view mode to use to render the current page.

Here is how to emulate different browser modes using meta tags:

Emulate IE 7:

<meta http-equiv="X-UA-Compatible" content="IE=7">

Emulate IE 8:

<meta http-equiv="X-UA-Compatible" content="IE=8">

Emulate IE 9:

<meta http-equiv="X-UA-Compatible" content="IE=9">

If the end client visits the page on a browser that is older than the specifed view mode (eg. User has IE 8 but view mode forces IE 9), the browser will ignore the meta tag and render the page the best way it can.

Categories
Uncategorized

Fixing the IE8 Double Click Bug

The Big Blue E
The Big Blue E (Photo credit: sbisson)

In Internet Explorer 9 & higher, there is a bug in handling form based javascript written for IE8. One of the side effect is that for ‘Forms’ with ‘Submit’ Buttons, it can cause a ‘Double Click Action’ on Submit.

This action can cause unexpected behavior on webpages designed primarily for IE8. There are a couple of ways to work around the issue. One simple JS fix is to replace the onclick call to something like this:

onclick="this.disabled=true; /*Do Required operation*/ return false;"
{adinserter 3}
Other options include, using a js listener to catch the click event and prevent it from double clicking.
Also changing the type of the button from “Submit” to Button apparently reduces the probability of this error recurring.

Enhanced by Zemanta