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}@message.alltel.com
AT&T: {number}@mms.att.net
Nextel: {number}@messaging.nextel.com
Sprint: {number}@messaging.sprintpcs.com
Suncom: {number}@tms.suncom.com
T-mobile: {number}@tmomail.net
Voicestream: {number}@voicestream.net
Verizon (text only): {number}@vtext.com
Verizon (pics and vids): {number}@vzwpix.com

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.