Statcounter

25 January 2007

iframe (2)

Firefox was happy with OBJECT menus, MSIE was not - it ignored target="_top" and thought I wanted to replace the menu with the page. Fortunately it did accept targetting with IFRAME.

And the really annoying bug in MSIE that keeps warning me about unsafe Javascript that becomes safe when uploaded is driving me nuts.

13 January 2007

iframe, scrollbars and mozilla

I wanted to embed a menu on all the pages of a website so I wouldn't have to change every instance of it. This can be done using IFRAME, but not content with that I wondered if it could be done with OBJECT since strict HTML doesn't have IFRAME.

It turned out to be possible:

<object data="sidebarframe.html">

The size of the object could be set in the website's Style Sheet. The problem then became the scrollbars that I didn't want. IFRAME has a scrolling="no" style setting, but OBJECT does not. Some CSS in the BODY of the frame solved that, complete with a Mozilla hack:

<style type="text/css">body {border:0; overflow:visible; }</style>
<style type="text/css">body {overflow: -moz-scrollbars-none;}</style>

10 January 2007

A very obscure bug

I found that bit of javascript that creates snow falling down the screen. Actually I found two versions, one had the snowflakes as tiny GIFs, the other as ASCII stars. Too late for this Xmas, but next year I'll be annoying people with them (they eat CPU time).

Except that the ASCII version didn't work in Firefox. After steadily cutting out the usual suspects - other javascript for example - the culprit turned out bizarrely to be the URL part of the DTD:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"

So there you are, my first trivia for the year.