Tuesday, May 21, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  13] [ 6]  / answers: 1 / hits: 38649  / 14 Years ago, thu, september 16, 2010, 12:00:00

I am using onkeyup=this.value=this.value.toUpperCase();to change input text value in uppercase. This is working but my need is to change a single letter in input box without using mouse event. If i use left arrow key to move cursor backward onkeyup event gets triggered and the cursor moves to end. How do I modify this script, so that I can navigate backward using arrow keys and modify a text somewhere in between



The current code looks like this...



<h:inputText value=#{_input.response} autocomplete=off onmouseover=this.focus(); onkeyup=this.value=this.value.toUpperCase();/>

More From » jquery

 Answers
92

How about CSS:



input.upper { text-transform: uppercase; }


Remark: This will still send the value to the server as typed by the user and not uppercased.


[#95603] Tuesday, September 14, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
darrylm

Total Points: 499
Total Questions: 131
Total Answers: 108

Location: Saudi Arabia
Member since Mon, Sep 5, 2022
2 Years ago
;