<script language="javascript"> // returns either character code or character code value, depending on what is passed as the char arg function quickLook(char) { if (jsIsInt(char)) { document.frm.showChar.value= String.fromCharCode(char); }else{ document.frm.showChar.value=char.charCodeAt(0); } } // Reggie's string manipulation functions function jsIsInt(val) { oVal = jsTrimLeft(val,"0") if (val == "0") { return 1 } result = parseInt(val) result = result.toString() if (result == "NaN") { return 0 } if (oVal.length != result.length) { // something lost in conversion return 0 } return 1 } function jsTrimLeft (str,tchar) { if (str.length == 0) {return str} while (str.indexOf(tchar) == 0 && str.length > 0) { str = str.substring(tchar.length) } return str } </script>
<script language="javascript"> // in-line javascript to build out the table // the table is defined in the HTML prior to the script declaration for (i=0;i<6;i++) { document.write('<td><B><font color=000000>Code</B></td><td><B><font color=000000>Value</B></td>'); } document.write('</tr><tr align=center bgcolor=FFFFFF>'); ctr = 0;rowCount=2;fColor='000000'; for (i=33;i<=255;i++) { ctr++; if (i<127 || i >160 ) { theLetter = String.fromCharCode(i); document.write('<td><font color=' + fColor + '>' + i + '</b></td><td><font color=' + fColor + '>' + theLetter + '</td>' ); if(ctr>5) { if (rowCount % 2) { fColor='000000'; document.write('</tr><tr valign=middle align=center bgcolor=FFFFFF>'); } else { fColor='FFFFFF'; document.write('</tr><tr valign=middle align=center bgcolor=006CA8>'); } ctr=0;rowCount++; } } } </script>