[thelist] Javascript problem

Peter-Paul Koch gassinaumasis at hotmail.com
Tue Feb 19 05:38:00 CST 2002


>I'm trying to get a DIV to align on the bottom of the browser window
>onload using Javascript. I've found a solution that works in IE and NN4
>on Mac -- as yet untested on PC -- but there's a frustrating bug.
>
>The version that works is here:
><http://www.mark.ac/help/bottom.html>
>
>The problem I've got is that if I include a DOCTYPE, it doesn't work in IE
>-- all I get is a Javascript alert stating invalid procedure call or
>argument.
>
>Any ideas?

Yep. Use document.documentElement instead of document.body . As far as I
know this is only necessary in IE6, but you've also seen this problem in
IE5Mac?

This is a very nasty one and it's one of the reasons I refuse to use
doctypes at the moment.

ppk

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com




More information about the thelist mailing list