:: Forum >>

Forcing text to uppercase in version 2.5.3

Hi, I have an activeWidgets textbox embedded in a grid. I want it so that the text is forced to uppercase as it is typed regardless of if the user has capslock on.
In version 2.0.1 the below code worked nicely

textBox.onControlTextChanged = function(text)
var upper = text.toUpperCase();

if (text != upper)

However when I upgrade to version 2.5.3 it resets the cursor when the function is called causing the word to be typed backwards. Typing "backwards" into the box results in "sdrawkcab" being displayed.
Any idea of a workaround?

Wednesday, December 10, 2008
lw, I did a fast check and found something that seems to do the trick,
but not really sure if is better using a different approach like setControlProperty('value' ... or setClass('value' ...
Also still a FF missing cursor issue (I couldn't find the right css fix) [pls point me to it ;-/ ]

textBox.onControlTextChanged = function(text){
var upper = text.toUpperCase();
if (text != upper){
if (AW.ie)this.getContent('box/text').setAttribute('value', upper) ;
if (!AW.ie)this.setControlText(upper);
Thursday, December 11, 2008

This topic is archived.

Back to support forum

Forum search