why we love internet explorer so much

Posted by phillip Mon, 30 Jan 2006 14:53:00 GMT

what’s wrong with this javascript?

function showDetailInNewWindow()
{
   // set new window properties
   top    = 200;
   left   = 250;
   width  = 680;
   height = 300;
   // ... proceed to open new window
}

the error message ie gave me: “not implemented, line 26, character 7”. in _which _of the included js files, you ask? well if it gave that information out, the error would be too easy to find, wouldn’t it?! and when you finally debugged which file it was, the line number was a couple of lines off.

this error message is as useful as asking your grandma’s parrot what was wrong with the code. except the parrot’s reply would be more intelligent.

2 hours lost. talk about efficient development. i’ll consider writing my front-ends in xul.

the error was (i figure): you shouldn’t use “top” inside a function. JS has all global vars in function scope as well, and ie allows you to omit “window” in some expressions. i.e. ie thought i was trying to say “window.top = 200”. which it

  • should have just done
  • complained that it’s a read-only property
  • complained that the object window doesn’t have that (public) property

or maybe top is a completely reserved keyword, why didn’t it tell me???

of course i only had to resort to opening the details in a new browser window since IE first needed loads of hacks and javascript expressions to get the data table i am displaying to look it as i wanted, and then, second completely messed up the while document when dynamically embedding the detail information into the current page (“ajax”).

ie 6 is definitely web 1.0.

Posted in , , |