Email to SMS

Trying to figure out how to email a grocery list to our street team, we ran across this list of major US cell phone providers and how to format emails to send text messages:

Provider Email Format
Alltel: {number}
AT&T: {number}
Nextel: {number}
Sprint: {number}
Suncom: {number}
T-mobile: {number}
Voicestream: {number}
Verizon (text only): {number}
Verizon (pics and vids): {number}

Replace the {number} with the 10 digit phone number of our recipient and now we can hand down our directives to the street team without ever picking up the cellie. Booyah!

Apply Dynamic Style to a Class

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.