<!-- Bad --> <td id="data"> <!-- Good --> If you store a record’s Id into an xhtml id attribute, store it …">

Get Off My Lawn

Adventures of a Curmudgeon

NTS: Id Xhtml Attribute

 <td id="text_data">  <!-- Bad -->
 <td id="data">  <!-- Good -->

If you store a record’s Id into an xhtml id attribute, store it directly and don’t decorate it with any text, especially when the text is only a decoration.

This obviates the need to do javascript substring manipulation when you need the number.

Cheers!