function changeToLowerCase(controlName)
{
document.getElementById(controlName).value = document.getElementById(controlName).value.toLowerCase();
}
//For address (if it contains numbers)function changeToLowerCase1(AddresscontrolName) {
debugger;
var address2 = "";
var address = document.getElementById(AddresscontrolName).value;
var addarray = address.split(' ');
for (var i = 0; i < addarray.length; i++) {
address2 = address2 + " " + addarray[i].toLowerCase();
}
if (address2.charAt(0) == " ") {
document.getElementById(AddresscontrolName).value = address2.trim();
}
else {
document.getElementById(AddresscontrolName).value = address2;
}
}
style="text-transform:capitalize;" onblur="this.value=this.value.substr(0, 1).toUpperCase() + this.value.substr(1);" onChange="changeToLowerCase(this.id)" MaxLength="50" onKeyUp="trimstring(this.id,this.value);"
{
document.getElementById(controlName).value = document.getElementById(controlName).value.toLowerCase();
}
//For address (if it contains numbers)function changeToLowerCase1(AddresscontrolName) {
debugger;
var address2 = "";
var address = document.getElementById(AddresscontrolName).value;
var addarray = address.split(' ');
for (var i = 0; i < addarray.length; i++) {
address2 = address2 + " " + addarray[i].toLowerCase();
}
if (address2.charAt(0) == " ") {
document.getElementById(AddresscontrolName).value = address2.trim();
}
else {
document.getElementById(AddresscontrolName).value = address2;
}
}
style="text-transform:capitalize;" onblur="this.value=this.value.substr(0, 1).toUpperCase() + this.value.substr(1);" onChange="changeToLowerCase(this.id)" MaxLength="50" onKeyUp="trimstring(this.id,this.value);"
No comments:
Post a Comment