Widgety Goodness (Part I)

Today I released the first version of OPod (Cue cease and desist letters from Apple). James has the scoop.
I think I’m going to make this the first of a series of posts releasing widgets I’ve developed as parts of other projects.

Things I didn’t know before starting this:

  • Firefox allows frames embedded to a maximum depth of 8 levels.

    There’s a much more elegant way of coding this up if you can embed frames within each other to an arbitrary depth. However, to stop crashes caused by infinitely recursing frames, the Firefox developers decided to disallow frames embedded in 9 other frames. How did they choose this arbitrary number? Beats me. Am I the first to come across a useful scenario for embedding more than 8 frames? (IE seems to have no limit.)

  • Navigating within multiple dynamically created iframes does something weird to the Firefox history list. (Still under investigation)
  • An iframe with no src adds a new item to Firefox’s history list but not to IE’s.
  • Overflow:scroll gets you mandatory scrollbars but overflow:auto only puts them in when the div actually overflows.
  • Scrolling divs have no scrollTo method. But you can set their scrollLeft and scrollTop properties to achieve the same effect.
  • You can set the rows and cols attributes of a frameset dynamically! (though I didn’t use this)
  • This works:
    var head = document.getElementsByTagName("head")[0];
    var link = document.createElement('link');
    link.rel  = 'stylesheet';
    link.href = 'style.css';
    • And finally, a plea to browser makers:

      In your next version, please support some kind of ContextAgnosticXMLHttpRequest (and come up with a better name while you’re at it). There’s a lot of client processing power going to waste right now while the server churns away fetching XML and transforming it one way or the other.

2 Responses to “Widgety Goodness (Part I)”

  1. David Barrett Says:


    You should be able to get around the frames issue, and have a lot more flexibility in terms of styling, if you use a different approach for your menu system.

    A List Apart had a great article on this very topic a few months back:


    Try out the examples. It seems to be exactly what you need.

    Hope it helps!

  2. Gareth Stack Says:

    Hey, Just came accross your OPod ‘widget’ via Eirepreneur. I run a weekly tech and humour vidcast over at http://www.technolotics.com – Would you be interested in coming on the show to talk about OPod, OPML and RSS?

Leave a Reply