There's document.selection property. It changes with document.onclick.

To select an element dynamically, document.selection.createRange is
available. There are other properties in the document.selection
object.

I found a good reference here: 
http://www.webreference.com/js/column12/crossbrowser.html

Any suggestion how I should do that?



On Dec 24, 6:47 pm, Kean <shenan...@gmail.com> wrote:
> Interesting idea, but, owing to your idea, I am more interested in
> knowing if there's a way to determine current active keyboard cursor
> offset in document.
>
> On Dec 24, 1:26 am, Sam Unplugged <guptasamee...@gmail.com> wrote:
>
> > Hello,
>
> > Is there an example of partial autocomplete? By 'partial' I mean, only
> > a part of textarea gets suggestions.
>
> > Users in my project are supposed to start a message in a textarea with
> > 'Dear <UserName>'
>
> > I want to make this <UserName> part either clickable like in Office
> > documents custom fields, and when a user is editing this part I want
> > to show a list of options (usernames from a database).
>
> > I can work out the backend, but I have no clue where to begin to make
> > such a textarea. Please help.
>
> > Thanks a ton.
>
> > Sam

Reply via email to