Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Internet Explorer Quirks

RSS
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">
    <option>Blue</option>
    <option>Red</option>
    <option>Green</option>
</select>

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

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 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2018, Patrick Jasinski.