Uppercase in textbox?

I want to use only uppercase characters in the textbox. How do i do this?


rick_mulderAsked:
Who is Participating?
 
Michel PlungjanConnect With a Mentor IT ExpertCommented:
<INPUT TYPE="text" onChange="var t = '' + this.value; this.value = t.toUpperCase()">

Michel
0
 
rick_mulderAuthor Commented:
object doesn't support this property or method..

Could you try it? Maybee i'm doing something wrong!
0
 
Michel PlungjanIT ExpertCommented:
Works for me in IE4.01 and NS 4.7 on NT4

<FORM>
<INPUT NAME="txtField" TYPE="text" onChange="var t = '' + this.value; this.value=t.toUpperCase()">
<INPUT TYPE="button" onClick="alert(this.form.txtField.value)" VALUE="test">
</FORM>

Be advised that var t = ''
has two single quotes and not one double quote

Michel
0
 
rick_mulderAuthor Commented:
thanks!
0
All Courses

From novice to tech pro — start learning today.