Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Background images are not updated in Windows Internet Explorer 9 Quirks Mode


View products that this article applies to.

Symptoms

Consider the following scenario. You have a web application that uses HTML similar to the following to change a class name once you click on the DIV element:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>test page</title>
<style type="text/css">
.On {
background-image:url(on.gif);
}
.Off {
background-image:url(off.gif);
}
</style>
<script type="text/javascript">
function changeclass(ui) {
if (ui.className == 'On') {
ui.className = 'Off';
} else
ui.className = 'On';
}
</script>
</head>
<body>
<div class="Off" onclick="changeclass(this);">Test</div>
</body>
</html>

The classes "On" and "Off" use different background images. The expected behavior is that the background image changes upon every click of the DIV element. However when viewing the web application using Windows Internet Explorer 9 in Quirks Mode the background image intermittently is not changed.

↑ Back to the top


Cause

This problem can occur if the legacy Internet Explorer Quirks Mode for rendering is used.


↑ Back to the top


Resolution

It is recommended to use the most current Windows Internet Explorer Standards Mode to view the web application. Windows Internet Explorer Standards Mode is not affected by this issue.


↑ Back to the top


More Information

Windows Internet Explorer 9 uses a Quirks Mode rendering engine which is not based on a Standards Mode rendering engine. The Quirks Mode rendering engine for Windows Internet Explorer 9 is based on Microsoft Internet Explorer 5.5. It was first introduced with Windows Internet Explorer 6 for backwards compatibility with legacy web pages.

For more information on using Standards Mode, please refer to the following document:

Creating Standards-Enabled Websites

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2814270
Revision : 1
Created on : 1/7/2017
Published on : 2/14/2013
Exists online : False
Views : 257