...

View Full Version : Lower and Uppercase changing



Dalziel
07-08-2003, 04:21 PM
Is there a function in Javascript to do the same job as PHP's strtoupper()?

If you don't know what the PHP function does but know JS here's an example.

$name = "dan"
$namecaps = strtoupper("$name");

$namecaps would now be "DAN"

Caffeine
07-08-2003, 04:26 PM
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
var myName = "phlegmatic";
alert(myName.toUpperCase());
alert(myName.toLowerCase());
</SCRIPT>

Dalziel
07-08-2003, 04:31 PM
Doh, Doh, Doh, LOL!

I was trying to remember what the function was called because I knew I used it on an old site that doesn't exist any more, I had it right except I was using a lower case C on case.

Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum