Dynamically populate an element styled with white-space: pre

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 

Condiments for SWFUpload Initial Release

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.

‘no element found’ in firebug or firefox javascript console

I think I figured it out. I think that the issue crops up if your server sends a response header of ‘Content-Type’ set to ‘text/xml’ and you send no content. The XMLHTTPRequest object then says ‘oh it’s xml? fine – …