DonB
|
Posted: 10/11/2005, 2:41 PM |
|
is a question asked frequently.
I discovered this can be accomplished via CSS:
<input style="text-transform: uppercase" type='text'></input>
Put this in your HTML page and the textbox will force all text input to be
uppercase. There are additional modifiers:
lowercase, capitalize, none, inherit
Of course, this can be browser-dependent, but seems to be supported in most
browsers.
--
DonB
http://www.gotodon.com/ccbth
|
|
|
DonB
|
Posted: 10/21/2005, 6:55 PM |
|
Interestingly, I discovered this puts uppercase text in the Textbox, but
sends the as-typed value back in the form data. So, it's NOT a viable way
to uppercase text before insertion into your database.
--
DonB
http://www.gotodon.com/ccbth
"DonB" <~ccbth~@gotodon.com> wrote in message
news:dihbis$313$1@news.codecharge.com...
> is a question asked frequently.
>
> I discovered this can be accomplished via CSS:
>
> <input style="text-transform: uppercase" type='text'></input>
>
> Put this in your HTML page and the textbox will force all text input to be
> uppercase. There are additional modifiers:
>
> lowercase, capitalize, none, inherit
>
> Of course, this can be browser-dependent, but seems to be supported in
most
> browsers.
>
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
>
|
|
|
Ganesan
Posts: 25
|
Posted: 10/23/2005, 9:23 PM |
|
Hi,
Copy the following code in your Functions.js:
// This function is used to change lower to upper case for the Input text
function cUpper(cObj)
{
cObj.value=cObj.value.toUpperCase();
}
After this, in your textbox's OnKeyup event put this:
return cUpper(this);
Save, upload and try.
Regards,
Ganesan
|
|
|
Alvaro Cobo
|
Posted: 10/24/2005, 9:19 AM |
|
There is a MySQL function (UPPER(str)) which does it. And there is a PHP
function as well (strtoupper()), so combining two or three of them, one
client side, so the user can see the text in uppercase, and one level side
(the server processes the string and changes the text to upper case) we can
get the desired result.
Hope this helps,
Alvaro.
|
|
|
Miz
|
Posted: 11/09/2005, 10:08 AM |
|
Thanks a lot Alvaro, thats very helpful tip
|
|
|
|