[thelist] .innerHTML help

Lindsay Evans lindsay at redsquare.com.au
Tue Sep 3 22:46:01 CDT 2002


doh, missed an i...

    function censor() {
      var totalSpans = content.getElementsByTagName("span").length;
      spans = document.body.getElementsByTagName("span");
      if (document.styleForm.swearFilter.checked) {
        for (i=0;i<totalSpans;i++) {
 	   naughty = '';
 	   for(ii=0; ii<=spans[i].innerHTML.length; ii++){
 	     naughty += '*';
 	   }
          spans[i].oldInnerHTML = spans[i].innerHTML;
          spans[i].innerHTML = naughty;
        }
      } else {
        for (i=0;i<totalSpans;i++) {
          spans[i].innerHTML = spans[i].oldInnerHTML;
        }
      }

    }

... and I just noticed Aaron's next message, so much cleaner than mine :)


--
 Lindsay Evans.
 Developer,
 Red Square Productions.

 [p] 8596.4000
 [f] 8596.4001
 [w] www.redsquare.com.au




More information about the thelist mailing list