My JS woks well when the city has one word:
- cHIcaGO ==> Chicago
But when it's
- san diego ==> San diego
How do I make it become San Diego?
function convert_case() {
document.profile_form.city.value =
document.profile_form.city.value.substr(0,1).toUpperCase() +
document.profile_form.city.value.substr(1).toLowerCase();
}