I am trying to get the entered text to auto change to Proper case within the same field. I started with the following script and it doesn't work. Can you please review and advise. thank you.
var words = str.split("");
var arr = Array();
for(i in words)
Lastname = Lastname.chrAt(0).toPropperCase()+Lastname.substring(1);