Warning: Constant ABSPATH already defined in /home/public/wp-config.php on line 27
It Wasn’t Sitemeter, It’s IE and JavaScript — Why Now?
On-line Opinion Magazine…OK, it's a blog
Random header image... Refresh for more!

It Wasn’t Sitemeter, It’s IE and JavaScript

I don’t use IE for a number of reasons, beyond the simple fact that it is a piece of MS garbage, but other people do, so I started looking behind the curtain with the Sitemeter problem.

The thing is, I use Sitemeter, and my site was visible using IE7, so it wasn’t just a Sitemeter problem, it was a design problem. The reason my site was visible is because the Sitemeter code was stuck at the bottom of the page, after all of the formatting, and outside any subsections [div] on the page. That’s where they tell you to put it:

Position the cursor in your page where you’d like the counter to go. A good place is at the bottom of the page right before the </BODY>tag.

According to their explanation on their blog for the IE problem:

The error occured when the SiteMeter tag was not a direct child of the body tag (e.g. if the tag was within a table or div).

During my testing I noticed that IE screws up my page, ignoring my Cascading Style Sheet [CSS] on the sidebars, and generally makes a mess of things.  Guess what, I have two little JavaScript routines to count down the number of days until the Shrubbery leaves office, and the number of days Osama has been free.  When I removed those from the sidebar, IE started following the CSS directives.

My conclusion is that IE doesn’t handle JavaScript well when it is in a table or div.  I didn’t change anything, IE changed something.