Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 15,206 times

Related Categories

Force case restrictions

tlkelley

You have a field in your database that you want to always be lowercase.

Try the following in your JavaScript:

<SCRIPT LANGUAGE="JavaScript">

function ChangeCase()
{
var strVariable = document.MyForm.txt_myfield.value;
strVariable = strVariable.toLowerCase( );
document.MyForm.txt_myfield.value = strVariable;
}

// End --></script>

To change the case to upper simply use toUpperCase() in your function above.

Hope this helps.

Always working hard!!

Comments