Read Text Pointer in the TextBox

asked 2014-12-31 08:59:16 +0800

kleponboy gravatar image kleponboy flag of Indonesia
54 5

updated 2014-12-31 08:59:57 +0800

Hi, I need some help here, lets say i have an TextBox and i have a text ie = "Hello World"; then i click the TextBox between "o" and "r", so the rough appeareance should be like this "Hello Wo|rld". where | = is my current pointer.

Is there anyway i could read my pointer position ?, in this case the pointer position should be after the eight character.

sorry for my bad english. i hope you understand



delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-01-04 09:55:45 +0800

Darksu gravatar image Darksu
1991 1 4

Hello kleponboy,

At the following url you can find the solution to your problem:


Code Sample from jimmyshiau:

    <textbox id="tb" onMyClick='msg.value = event.getData()+"";' />
    <label id="msg"/>
                "zAu.send(new zk.Event(this,\"onMyClick\", zk(this.$n()).getSelectionRange()[1]));");

Best Regards,


link publish delete flag offensive edit


dude, thanks a lot, you save my time :D

kleponboy ( 2015-01-05 03:34:36 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2014-12-31 08:59:16 +0800

Seen: 6 times

Last updated: Jan 04 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More