[thelist] .innerHTML help

Aaron Boodman aaron at youngpup.net
Tue Sep 3 22:53:01 CDT 2002


grr. I am so lame.

should be:
spans[i].innerHTML = spans[i].oldInnerHTML.replace(/./g, "*");

yep, tis a regex. it says "replace any letter [.] any number of times [g]
with '*'". I highly recommend you invest some time in learning them.
incredibly powerful, and portable to a number of langauges. I learned the
basics of regex's from David Flanagan's O'Reilly book: Javascript: The
Definitive Guide (chapter 7 I think?). But there's got to be bazillions of
tutorials out there.

--
Aaron Boodman
aaron | www @ youngpup.net

----- Original Message -----
From: "Ken Kogler" <ken.kogler at curf.edu>
To: <thelist at lists.evolt.org>
Sent: Tuesday, September 03, 2002 8:45 PM
Subject: RE: [thelist] .innerHTML help


> > spans[i].innerHTML = spans[i].oldInnerHTML.replace(/./, "*");
>
> That's only replacing the first letter of each word. :(
>
> > /./, "*"
>
> Is that regex? I've tried and failed numerous times to learn it. Even
> read that highly-rated evolt article on it...
>
> --Ken
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list