javascript help

Posted by: RobotCaleb

javascript help - 28/07/2003 08:30

i just decided to pick it up today and already run into errors, my future bodes well.

i cant figure out why this :
for (var i=0;i<=tempstring.length-1;i++) {

alert(tempstring.charcodeat(i));

and this :
for (var i=0;i<=tempstring.length-1;i++) {

alert(tempstring.charat(i)) ;

dont alert, but this does :
for (var i=0;i<=tempstring.length-1;i++) {

alert('Character = ' + tempstring ) ;


any help?
Posted by: mcomb

Re: javascript help - 28/07/2003 16:21

Javascript is case sensitive. You want charAt() or charCodeAt().

-Mike
Posted by: RobotCaleb

Re: javascript help - 29/07/2003 09:42

thanks, fixed it