-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi to everybody!
I write here because i have a problem with the event onChange in of a textbox.
I have a multiline textbox and the people insert data there. And i want that, when a ; is insert something happend.
I beleave that the method onChange must capture every key that was press but it capture only when the textbox lost focus. And the event onCHangin is not usefoul either because it is to slow in capture and, when capture, the las character doesnt appears...
I think that the problem is that the event onCHange doesn't work like it must be, but maybe I am wrong. Some one know a workarround or something like that?
I'm using ZK 505, Ubuntu 10.04, Netbeans and glasfish v3
Thanks for reading!
Joaquin
maybe you can use the javascript function onkeypress :
<html><head><title>Test</title> </head><body> <form name="Test" action=""> <input type="text" size="30" name="Eingabe" onkeypress="alert(this.value)"> </form> </body></html>
search the forums for zkau.send and if that fails, look here: Communicate with Server
Eyy!! Interesting... I don't know that i can send information to the server like this... Thanks!
Two questions:
-Have you got (or anyone) an example of this??? (a mini project or some code) I would
- The method onChange must be call every time that an user press a key in a textbox (or not?)... Why that happend don't happend to me :( ?? it is only call when the textbox lost the focus :(!
Joaquin
onChange doesn't work for you, you have to listen on the onChanging-Event:
<zk> <textbox> <attribute name="onChanging"><![CDATA[ if(event.value.contains(";")) { alert("found ;"); } ]]></attribute> </textbox> </zk>
Asked: 2011-04-11 08:31:46 +0800
Seen: 1,840 times
Last updated: Nov 27 '11