2008.09.18

Apply Dynamic Style to a Class

By underblob @ 9:56am — Categories: Javascript, Tech

We recently needed to create an HTML page and dynamically hide/show an entire class of <div> tags that were interspersed throughout the page. Using the getElementsByTagName javascript method, we were able to iterate over all of the <div> elements in the document. Then check the CSS class by accessing the className DOM element:

oDivs = document.getElementsByTagName ( “div” );
for ( d = 0;  d < oDivs.length;  d++ ) {

// cl_name = oDivs[ d ].getAttribute ( “class” ); // does NOT work in IE
cl_name = oDivs[ d ].className;
if ( cl_name == “bio” ) {

oDivs[ d ].style.display = “none”;

}

}

Note that the getAttribute method does not work in IE since class is a reserved word for IE. Took us a little while to figure that one out.

2008.09.14

Femunokku

By underblob @ 12:53am — Categories: Random
Tags: ,

Knock me down gently
Hearts are not light for floating
You don’t need a fool

2008.09.11

W side hwy

By underblob @ 12:35am — Categories: Remote Post

W side hwy

DSC01422.JPG

2008.09.05

HttpFox

By underblob @ 6:13pm — Categories: HTTP
Tags: , ,

Recently we had to troubleshoot an Internet Explorer problem with a force download ASPX script. The download script was being called from a Flash movie. After the call to the download script, all outgoing Javascript calls from Flash were either loading in the Address Bar and not being executed as Javascript (IE6) or were throwing errors (IE7).

It was a black box situation where we only had HTTP access to the server. We needed to examine the HTTP headers to determine if they were a contributing factor to the issue. But how? We found this clever Firefox Add-on that did the trick: HttpFox

2008.09.04

Postie

By underblob @ 5:45pm — Categories: WordPress

We just found a really neat-o plug-in for WordPress called “Postie”. It enables you to send email messages that get posted to your blog. Any video or image attachments are also included in the post. We tried sending snapshots from our cellphone to Postie and it works like a charm. Check it out here: postie.economysizegeek.com

Toby!

By underblob @ 5:26pm — Categories: Remote Post

Toby!

DSC01421.JPG

Old school urinals

By underblob @ 4:28pm — Categories: Remote Post

At the Old Town Bar near Union Square, NYC.

DSC01308.JPG

2008.09.03

Hello World!

By underblob @ 1:17pm — Categories: Random

We installed and skinned WordPress a couple times for blog-hungry clients in the past year and liked it so much we decided we wanted one of our own. Welcome to the new WordPress powered iteration of Underblob: V3.

Cheers!