mikehump
11-10-2002, 06:01 AM
I'm doing a little Javascripting and need to be able to convert
a string like:
100000000000
to
100,000,000,000
Ultimately I will be using it in an alert(); function.
e.g alert("You scored a total of " + total + " points! Good Job!")
Do I need to go in a direction that would involve regular expressions?
I tried this but it doesn't work:
TestString = TestString.replace(“XXX,XXX,XXX,XXX”, TestString);
alert("TestString.replace(“XXX,XXX,XXX,XXX”, TestString) = " + TestString);
Thanks for any help you can provide.
Mike Humphrey
Catholic Apologist and Web site Developer
http://www.mikeswebsites.com
http://www.cpats.org
:confused:
a string like:
100000000000
to
100,000,000,000
Ultimately I will be using it in an alert(); function.
e.g alert("You scored a total of " + total + " points! Good Job!")
Do I need to go in a direction that would involve regular expressions?
I tried this but it doesn't work:
TestString = TestString.replace(“XXX,XXX,XXX,XXX”, TestString);
alert("TestString.replace(“XXX,XXX,XXX,XXX”, TestString) = " + TestString);
Thanks for any help you can provide.
Mike Humphrey
Catholic Apologist and Web site Developer
http://www.mikeswebsites.com
http://www.cpats.org
:confused: