aharrisreid
Programmer
I have an input textbox on a form in which I want upper-case characters only, to which end I am using style="text-transform:uppercase" in the HTML input definition. Text is converted to upper-case upon data-entry, but the posted value is in the entered case, not always uppercase.
Using onchange="this.value=this.value.toUpperCase()" converts the entered string to uppercase, but only when the textbox loses focus.
What is the simplest way to ensure that entered data AND posted value are both uppercase? It seems rather clumsy to have to use both style and onchange commands for what should be a simple operation.
I would prefer a HTML/CSS solution if possible, but failing that, JavaScript will do.
TIA
Alan