GoVoteAbsentee.org / learn how to vote absentee!

« Pure Baller. Pure Power. »

My blog is generally aimed at helping people by putting information out there that I wish was out there when I ran into computer or programming issues. But in addition to that, you'll find the occasional recipe, thought, recommendation, or some pictures.

Dynamically populate an element styled with white-space: pre

Filed Under (web) by james on 22-01-2008

Tagged Under : , ,

Assume:

$ = document.getElementById;
pre = $('pre-text-element');  //pre-text-element is the ID of my pre tag element

You cannot use:

$('element').innerHTML = 'line1\nline2'; //will not work in IE7

You must do this:

e = $('element');
while(kid=e.firstChild) { e.removeChild(kid) }  //remove all children in the
e.appendChild('line1\nline2');

Lame, huh?

Condiments for SWFUpload Initial Release

Filed Under (web) by james on 28-03-2007

Tagged Under : , , , ,

I have released a kit which aims to make life a little easier for those of you who want to spruce up the SWFUpload interface with some style. An example using the tango desktop project theme:

Screenshot of Condiments in action.