ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

onkeyup event

satishxkarra
6 Sep 2011 00:06:37 GMT
6 Sep 2011 00:06:37 GMT

hi

i wolud like to use onkeyupevent in zk for textbox .actually i am using onchanging event but it works after the focus is off

code is like this
textbox is is finType

public void onChanging$finType(Event event) {
this.finType.setValue(StringUtils.upperCase(this.finType.getValue()));

}

please help

is there any another way to get onkeypress autocaps

vincentjian
19 Sep 2011 04:23:57 GMT
19 Sep 2011 04:23:57 GMT

Hi,

Try using client event with JavaScript

<textbox xmlns:w="client">
  <attribute w:name="onKeyUp">
    var value = this.getInputNode().value;
    this.setValue(value.toUpperCase());
  </attribute>
</textbox>

Please let me know if this works for you.