//future code container //
//future code container //
//future code container //
//future code container //
//future code container //
//future code container //
//// Targets all (and only) text input elements to have clearing/vanishing text onfocus
####### START ##### <style type="text/css"> .grey {color:#cccccc;} .normal {color:#000000;} </style> <script type="text/javascript" > function clear_field() { text_inputs = document.body.getElementsByTagName("input"); for (g=0;g<text_inputs.length;g++) { if (text_inputs[g].type == 'text') { text_inputs[g].className = 'grey'; text_inputs[g].onfocus = function() { this.value = '';this.onfocus = '';this.className = 'normal'; } } } } window.onload = clear_field; </script> <input type="text" id="search" value="Click here to search ..."><br> <input type="text" id="search2" value="Click here to Mamba ..."><br> <input type="text" id="search3" value="Click here to Salsa ..."><br> <input type="text" id="search4" value="Click here to Tango ..."><br> #######END######
// This javascript function is to get all of the th elements ids of a table element //
function getcrawling() { // Begin crawling table element tablecrawl = document.getElementById('mytable'); thcrawl = tablecrawl.getElementsByTagName("th"); var scripts = new Array(); for (j=0;j<thcrawl.length;j++) {scripts[j] = thcrawl[j].id;} // End crawling table element alert(scripts); } |