3.2.0

Change ui.input background on(off) Focus ?

Hi, just wander...

I would like to change background of any focused input (prehaps the combo and list too) when they get focused and switch back to default at blur to make it easier to navigate (orient myself) in a difficult form.

what should I do ? Is there some place in style where to put the color to affect all such things ?
ASJ
April 22,
Try this:
But, why FF need a second click ???
var obj = new AW.UI.Input;
obj.setControlText(''); 
document.write(obj); 

obj.onControlActivated = function(event){
          this.setStyle('background', 'yellow'); 
}

obj.onControlDeactivated = function(event){  
     this.setStyle('background', 'green');
}


April 22,
I do not know... I thinl it is because it is so strict... somewhere something is missed, bt for example...

in the demo page there are groups, wich when clicked does trigger closeing of combo after first click, but the the rest of the page seems to not use the same event to be triggered...

really not sure, but in the case of my form:

I have page with 3 groups of controls
when I open the combo I and then click on any other control or the group background it closes the combo imediately, but if I hit the page (itself) background it seems to Blur() the combo (it is not selected) but not closed. the Focus() of the page is triggered after the second click and it is not matted how long you wait, so it is not taken as dblclick.

BTW: Combo seems to not use onfocus or onblur triggers, I wanted to use them for this color change but...

Maybe I should read the documentation more carefuly...

[REM: I am talking about Blur() and Focus() wich eventualy may not be the right events, but seems to explain enough.]
ASJ
April 23,

This topic is archived.

See also:


Back to support forum