• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

only upper case in input field

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how do i allow only uppercase letters to be inputted
in a textfield

thanks
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why don't you just change it when they exit the element

onblur="this.value=this.value.toUpperCase()"

Eric
 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Nelson,

you can also use CSS to do this


Herman
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello Herman,

it is working with text field only but i want it work with password input type also. is it possible if possible tell me how to do it



regards
 
nelson christos
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Herman
 
Narasimha Raju Naidu
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi nelson christos,

it is working with text field only not with password. do you/any one know how to change case of password.

regards
 
nelson christos
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Narasimha

actually my problem was with the text field only
because i need to show that to the user when he' typing it

however the password field is not supposed to show the
letters typed so need not have to make it uppercase
but you can surely save it in uppercase using the upper() in database
 
Narasimha Raju Naidu
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for your reply,

it working for the perpous of displaying only while retriving it is giving lower case letters only. is it required once again convert using toUpper().
 
nelson christos
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Narasimha Raju Naidu:
thanks for your reply,

it working for the perpous of displaying only while retriving it is giving lower case letters only. is it required once again convert using toUpper().



i dont get you
if you insert the record using the upper() function
of database you are going to retrieve back uppercase only.
 
Narasimha Raju Naidu
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no not like that

i am using this field for user name. while typing it is displaying in upper case only. but while comparing with database values(they are already inserted in upper case only) it is giving not a valid user. here i wrote one ouput satement in order to check what is wrong. here is is displaying in lower case only.

what i am asking is after keeping that "style property" once again any conversion method is require.

regards
 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic