3.2.0

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)
this.setControlText(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?

Thanks.
lw
December 10,
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 ;-/ ]
HTH

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);
}
Carlos
December 11,

This topic is archived.

See also:


Back to support forum