Jasinski Technical Wiki


Home Page
All Pages

Quick Search
Advanced Search »

Contributor Links

Create a new Page
File Management
Your Profile

Other Wiki Sections



Internet Explorer Quirks

Modified on Thu, Feb 14, 2013, 9:07 AM by Administrator Categorized as ASP·NET Web Forms, HTML and CSS, JavaScript, jQuery, and Angular
See also: http://net.tutsplus.com/tutorials/html-css-techniques/9-most-common-ie-bugs-and-how-to-fix-them/

SCRIPT tags - TYPE attribute

type='application/javascript' doesn't work
type='text/javascript' works

Caching of AJAX calls

IE is know for aggressively caching AJAX results. To bypass this, use the following code.

$.ajaxSetup({ cache: false });

Setting Value of Dropdowns

When setting the value of a drop down list and the value doesn't exist in the list, the behavior is browser-dependent.
  • IE simply leaves the dropdown selection unchanged.
  • FF and Chrome revert to the first item in the list.

Image Titles

When an tag doesn't have a TITLE attribute, FF and Chrome show no tooltip; IE shows a tooltip containing the image's file name. The work-around is to change the tag to have an empty TITLE attribute.

Images for List Item Bullets

The following CSS will use the bullet.gif file as a bullet for the list items, but it doesn't work consistently in IE. (Some list items will have no bullet.)
li { background: url('bullet.gif') no-repeat left 5px; }

Work-around: The following CSS fixes the above problem.
li { list-style-image: url('/bullet.gif'); }

Drop Down Lists without Underlying Values

If you have a dropdown list (a <select> tag) where the options listed don't have underlying values (i.e., no value attribute), when the enclosing form is submitted, the dropdown list's value won't be included. (This issue seems to have been resolved in IE9.)

Change this...
<select name="Color">

To this...
<select name="Color">
    <option value="Blue">Blue</option>
    <option value="Red">Red</option>
    <option value="Green">Green</option>

String Trim Function

The string trim function doesn't work in IE8 as it does in other browsers. Sometimes it fails silently; sometimes it gives the error message "Object doesn't support property or method 'trim'", possibly within a jQuery JavaScript file. The fix is to use the alternate syntax given below.

$(selector).val().trim()     // gives error in IE8

$.trim($(selector).val())    // use this syntax instead

ScrewTurn Wiki version Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.