function replaceText(sId, sText) { var el; if (document.getElementById && (el = document.getElementById(sId))) { while (el.hasChildNodes()) el.removeChild(el.lastChild); el.appendChild(document.createTextNode(sText)); } } #### td({-id=>'SPECIALNAME_' . $g->Identifier},'N/A'), # The 'N/A' gets replaced