December 2001

12/24/2001 Monday

IE Document.Open() Advisory - using document.open() in IE6 allows you to steal cookies, read local files and spoof other sites. (via Taz)
11:35 permalink

Micheal found a bug in the javascript countdown timer - I forgot to take into account NS4.x's weird treatment of layers so you can't put a countdown on a positioned element and expect it to work. I'll be fixing that soon.
11:25 permalink

Design Your Own O'Reilly Book Cover. (via Sang via B3TA)
11:20 permalink

IE5.1 for Mac Classic (released early last week) appears to suffer from the the missing scrollbar issue that I thought was specific to IE5.1 for MacOSX. Specifically, if all the content on a page in contained in positioned elements, scrollbars sometimes don't appear when they are needed. The solution is to add a transparent gif to your page that is stretched to cover the largest area you think you need. It's not very pretty because you'll always have scrollbars even if you don't need them. Maybe do a browser detect for Mac IE5.1 before dynamically adding the gif so other browsers don't see it. Incidentally, the Mac Classic version of IE5.1 identifies itself as 5.13 if you inspect the navigator.appVersion property while the MacOSX versions range from 5.1b1 to 5.12.
11:15 permalink

12/18/2001 Tuesday

Find Out What Anything You Are
You know all those quizes that let you know what type of fruit, cat, gardening tool, impressionist painter, greek philosopher, etc you are? Take my anything quiz! Just type any noun (you can be as specific as you like) in the box below and hit the button! No quiz questions to answer! It's all done through advanced behaviour analysis! Instant gratification!

22:40 permalink

BlueRobot: Flash of Unstyled Content. More for my own records than anything else. I'm beginning to notice that one of my main research tools is the search on this site.
22:35 permalink

Checklist of Cult Characteristics. Rate the company you work for. Kinda scary.
22:30 permalink

12/13/2001 Thursday

I get on the bus. The sign says:

2 zones: $2.50

and

Please use exact change only

So I do. I deposit one (1) twonie and two (2) quarters into the slot. The machine eagerly counts them and cheerfully displays "$2.50" on it's LED display. But the driver isn't looking.
"Transfer?"
"Please."
He jabs a button. The machine gleefully prints out a transfer and trusts it out where the driver immediately grabs it. He has noticed the machine's "$2.50". He has printed out the wrong transfer. It's a one-zone instead of a two-zone. He has to print out another. "Next time, let me know if you need a one-zone or a two-zone." "Tell you what, asshole, how about next time I will put in my exact change, just like the sign says, and you will use that tiny scrap of brain that is loitering around in your head to quickly and easily determine the type of transfer I want and give it to me. I know you find it taxing but maybe someone will add another 6 lines to the program that runs your happy little machine here to do that job for you and remove the last area of your job that requires you to be sentient and you can finally complete your lobotomy."
21:00 permalink

12/11/2001 Tuesday

One of the interesting thing about style property values is that the internal value may differ from the value that you explicitly set. For example, assume you are using the DOM to set the backgroundImage property for an element:

var bgImage = 'url("some_image.gif")'
var element = document.getElementById('some-element');
element.style.backgroundImage = bgImage;
      

If you now queried the value of backgroundImage for this element, you would expect the value to be equal to bgImage. Instead, in IE5, you'd get url(some_image.gif) (the quotes are gone) and in Mozilla, you'd get a full url something like url(http://www.dithered.com/some_image.gif) (again, the quotes are missing). The quotes surrounding the url are optional according the the specification so including them when setting the value is perfectly legal. Testing style properties for strict equality to particular values is probably not a good idea.
09:30 permalink

Kazoo mp3s. The flash intro is also worth a look. (via Sang)
09:00 permalink

12/07/2001 Friday

A big hello to all my fans out there.
08:35 permalink

WebmasterBase: Format HTML Email for AOL.
08:30 permalink

Register: No-HTML plug-in for Outlook available.
08:30 permalink

12/05/2001 Wednesday

In IE, Image and Option don't appear to be true objects. They don't have a prototype and, if you list the members of the window object, Image() and Option() appear - probably as functions that return the required objects automagically. The upshot of all this is that you can't extend Image or Option objects by adding properties or functions to the prototype object. In NS, you can.
10:40 permalink

12/04/2001 Tuesday

Garbage collection in Javascript is automatic and usually takes place during a navigation event (when a page is unloaded from memory) or when a certain quantity of memory is exceeded. In IE, there is an undocumented function, CollectGarbage(), that allows you to start garbage collection whenever you like. Though it's use is discouraged, sometimes it's needed to flush the memory. Excel, for instance, doesn't shut down after correctly when you use it as an ActiveX object so a call to CollectGarbage() is needed to kill it (even Microsoft acknowledges this use of the function). For more details on IE's garbage collection, including cautions on the use of CollectGarbage(), see the 3rd question on Microsoft's Web Q&A page from May 2001. Mozilla doesn't have a similar manual garbage collection trigger but there have been talks of including one.
08:50 permalink

Archives