-
FEATURED COMPONENTS
First time here? Check out the FAQ!
how to get the cursor position from a Textbox.
I can only find setSelectionRange but can not find getSelectionRange.
How to get the cursor position from a Textbox.
Hi yaudeh,
You can listen the onChanging event, then you will retrieve a InputEvent.
please refer to the following link
InputEvent
I have created a sample
<zk> <textbox id="tb" onMyClick='msg.value = event.getData()+"";' /> <label id="msg"/> <zscript><![CDATA[ tb.setWidgetListener("onClick", "zAu.send(new zk.Event(this,\"onMyClick\", zk(this.$n()).getSelectionRange()[1]));"); ]]></zscript> </zk>
Asked: 2010-12-15 19:18:52 +0800
Seen: 898 times
Last updated: May 02 '11