Javascript Dynamic List Creation

So you want to have your javascript dynamically add structure to your page without reloading. Yes, you can do this, and it all comes down to the document.createElement function, which works in at least Firefox 1.0.3, IE 6, and Konqueror.

How to do this? It’s actually a fairly simple javascript function that does this:


function listAdd(input)
{
// Input mode
var list = document.getElementById('thelist');
var element = document.createElement("LI");
element.innerHTML=input;
list.appendChild(element);
}

First off, we get an element named ‘thelist’ — this is the OL or UL tag enclosing your list. Then, we create a new element. In this case, it’s a “LI” element. Next, we use the innerHTML property to set what goes inside the LI and /LI tags — in other words, innerHTML is what’s inside the tags. Finally, we use the appendChild function to add the element we created to the list.

The end result can be seen and tested here.

Overall, it’s a fairly simple but highly effective little technique that you can add to your bag of tricks.

Breaking your constituents tv is political suicide

MAKE: Blog: MAKE Audio show: Cory Doctorow on the Broadcast Flag

Hosted by: Phillip Torrone, Associate Editor MAKE Magazine.
Show details: 20 minutes, 10MB, MP3.

I thought that this podcast, which is mainly just Cory Doctorow talking about the broadcast flag was interesting. The take home point for me was, “Breaking your constituents’ televisions is political suicide”

This podcast is basically a narrative from Cory going over the history and timeline of the broadcast flag — how it’s been struck down over time in various forms and how we’re still not entirely out of the clear.

ATA Over Ethernet is cool

I don’t think it’s just me, but ATA over ethernet has got to be one of the coolest things I’ve seen, recently. ATA over ethernet basically lets a driver on your computer access hard drives on a LAN (AoE is not routable). You can then set the multiple drives you access up to be mounted into a software raid array.

Basically, you’re using ethernet cabling plus some driver magic to connect hard drives up to your server.

Right now, the only manufacturer I’ve seen who makes ATA over ethernet products is a company named Coraid

You can get full details about how to set one of these things up in the June 2005 issue of Linux Journal, in the article titled, “ATA over Ethernet: Putting Hard Drives on the LAN”

For further reading, you can go to the Linux Journal article resources page

The Podcast Revolution

Podcasting (also) is a relatively new form of media distribution, and it’s got quite a bit of buzz about it. While not quite taking the world by storm, it is changing the way we think about media distribution. Functionally, however, I think that most people see podcasting as “radio shows for your ipod” — This is certainly the case, but I think that this is just the beginning. We’re already seeing podcasting clients written for pocketpc, and it’s only a matter of time before we see them in other devices, too — palms, cellphones — everything. The most intriguing thing to me, however, is having your MythTV/Tivo subscribe to podcasts. Not because it’s your tv, but because of what it will eventually do.

Currently, it’s really cheap to produce a podcast. However, as the market expands, there will be bigger budgets and higher production values (as well as commercialization of the content itself). As a result, the higher production budgets/values will allow people to do a lot more with their podcasts. A couple weeks ago, Adam Curry was talking about embedding images into podcasts to be displayed along with an audio stream. (for example, on your ipod photo). That’s great, i think it’s a wonderful idea; and i want to figure out the best way to get it done. However, it’s going to be a while before ipod photos (or whatever device you’re listening on) are prevalent enough to support this. I think tivo/mythtv podcast clients could do this pretty easily — i mean, they’re already hooked up to your tv.

By taking the idea of podcasting+images and extending it a little bit, you’ll get podcasting with metadata. One way to think of it is a long mp3 with text, notes, images, videos, whatever, packaged together. Another way to think of it is as a package with instructions. In other words, you could send an archive of your information with instructions on what to do. An example of this would be to send a SMIL file packaged with your media. Some media would be there for informational purposes, other media would be there to be displayed depending on the attributes of your player. Basically, whatever your current device can handle, it handles — the rest is ignored.

Taking this to the extreme, you basically have dvds — notes, outtakes, extra video, alternate audio, alternate camera angles, etc. I’m not saying you have an actual DVD, you just have the mechanism to distribute that type of content. This is where the creative destruction begins. Now, anyone with some bandwidth & the ability to produce content can publish their own — anything! Video editing is becoming easier and easier to do w/ home computers these days, and there are lots of people out there who want to do tv/film, but just need a way to get their content to people.

That way is podcasting. Not podcasting now, but what it will become. The “podcast distribution mechanism of the future” will allow people to subscribe to feeds for whatever they’re interested in, just like it does now. The difference is that with a rich media fabric to embed content, and a large existing distribution base, there will be interest from bigger media. Maybe it’s not the major networks, but it will be someone. There will be networks that are eager to distribute their content who will produce and distribute it this way, and there will be small people doing what they love, putting their content out there too. Tools (software) will get better, and the end product will be decent — decent enough to get an audience, ad revenue, to bring more viewers, and grow the medium.

I think some of this is already happening within Tivo, with their “Tahiti” project. See here