ie6 snippets

Solving "Internet Explorer cannot open the Internet site Operation aborted."

Tagged ie6, ie7, bug, ajax, prototype, scriptaculous  Languages javascript

This bug exists in IE6 and IE7 and is caused by a JavaScript that tries to modify a tag that hasn't been closed (yet).

For example this one:

<div id="x">
  <script type="text/javascript">

This example fixes the problem, because the script is defined after the tag that it tries to modify:

<div id="x">
<script type="text/javascript">

See BUG: Error message when you visit a Web page or interact with a Web application in Internet Explorer: 'Operation aborted' for a detailed explanation of the problem.

How to get min-width and max-width working in IE 6

Tagged ie6, hack, min-width, max-width  Languages html

Far from optimal, but should work in most cases:

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="ie6-is-a-shitty-browser.css" />
#wrapper { 
   width:expression(document.body.clientWidth < 950 ? "950px" : "100%" ); 

Note that users might get security warnings.

Trigger hasLayout for IE

Tagged haslayout, ie6, ie7, ie, browser, bug  Languages css
<!--[if IE]><style>
.layout {
    height: 0;
    he\ight: auto;
    zoom: 1;