Matt RaibleMatt Raible is a Web Architecture Consultant specializing in open source frameworks.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Making your tables more accessible?

A question was asked on the display tag user list recently. Basically, the user wanted to add onmouseover and onmouseout events to the <tr>'s in a display-tag rendered table. Today, I decided to whip up a quick example of how to do this in a DOM-compliant browser. Just add an "id" attribute to your table, or use document.getElementsByTagName("table") (selecting the appropriate table in the array), and then put the following JavaScript block below your table. Of course, you must define a "tr.over" class in your CSS.

<script type="text/javascript">
    var table = document.getElementById("testTable");
    var rows = table.getElementsByTagName("tr");
    for (i=0; i < rows.length; i++) {
        rows[i].onmouseover = function() { this.className='over' };
        rows[i].onmouseout = function() { this.className='' };
    }
</script>

Now for an example:

       
       
       
       
       
       

Later: You can take this one step further and add an "onclick" event so that the user can edit the record the row is referring to. Let's pretend you have a link in the first <td> of the table. Inside this link is the recordId for that row. Adding an onclick to the row makes it easy to route the user to the details page for the record.

rows[i].onclick = function() {
    var cell = this.getElementsByTagName("td")[0];
    var link = cell.firstChild;
    var id = link.firstChild.nodeValue;
    location.href='URL to details page?recordId='+id;
    this.style.cursor="wait";
}

Posted in The Web at Apr 22 2003, 04:55:25 PM MDT 25 Comments

An iPod in my future?

iPod I'm thinking about getting an iPod. I've been using a walkman tuned to the FM stations in Denver for my ride to/from work, but it's not cutting it anymore. So the question is "Which one?" There's a Windows version and a Mac version, and supposedly the iPod is configured to only work with one machine? My Windows machine has all my music on it, and my music-downloading software, so the Windows version is probably the best candidate. Another reason for the Windows version is that my Win box never moves - it's always at home.

5 gigs or 10? I only have around 500 songs - so 5 gigs is probably a good size. With 27 gigs free on my OS X hard drive, I don't really need more space. What I'm really asking here is: Send me links of good software for the iPod. I've heard rumors that there's stuff out there that'll allow you to use it on more than one machine. Feel free to remain anonymous, or use my contact page to send me an e-mail if you don't want to comment.

Posted in Mac OS X at Apr 22 2003, 11:25:28 AM MDT 5 Comments

Roller Bugs?

I'm encountering the following bugs with Roller's 0.9.7.1 - once I make sure I can reproduce them with the latest build, and the "x2" theme, I'll enter them as bugs (then hopefully fix them).

  • News items - newsfeed.vm has some issues and won't render newsfeeds correctly. I seem to be the only one using these, but I believe a fix is still in order. This is only a bug with the new velocimacros. I had it working yesterday, and then Dave updated weblog.vm and website.vm, and now it's broken again. I reverted my newsfeeds back to the old $macros.showAllNewsfeeds.
  • Linkback - I can get linkback to work, but I can't get it to display after each day - it only shows up at the bottom of all my entries. It might be an HTML issues - I'll have to validate this site as XHTML and do a bit of cleanup to confirm this is actually a bug.
  • Joe Hewitt comments - I have the display working, but posting doesn't. Actually, the post works, but the redisplay doesn't. I'll have to post a few comments on Joe's blog to verify that his comments system works like I expect it to. Maybe I should check-in what I have working and someone else can hack around with it?

I doubt I'll get to verifying/fixing these for a few days. Today is our 3 year anniversary, tomorrow will be another ride-home-day/late arrival (last night I got home at 8:00) and Thursday night I'm going to the Jimmy Buffett concert. As for today being our anniversary - it's been an awesome 5 years since I met Julie - getting married to her was the best decision I ever made, and having Abbie was the best decision we ever made. Life just keeps getting better, what luck!

Posted in Roller at Apr 22 2003, 07:13:27 AM MDT Add a Comment

Riding in the Rain

Last night's ride home was an invigorating experience. 30 minutes into my ride it began to rain. Then the lightning came. It made me feel so so alive as I strained my muscles to go faster and I gritted my teeth to block out the cold. 20 minutes later I caught a tailwind and a smile molested my face. 15 minutes after that a double rainbow appeared and I giggled like a little school girl. It was won of my best riding-home experiences and a great feeling of accomplishment flooded my body as I stumbled into our living room. Very wet, but very alive.

Posted in General at Apr 22 2003, 06:44:25 AM MDT Add a Comment