G
Guest
Hi, I have a textbox that users enter an email message. Next to this textbox
is a list of placeholders (for example <<Customer>> and <<Contact Full
Name>>). A user can enter some text and then insert a placeholder (later in
the code these placeholders are replaced by field values).
I use the syntax txtBody.selstart to locate the position of the cursor to
know where to locate the placeholder.
The problem is this. If the user is entering text and then double-clicks a
placeholder list item, txtBody.selstart = 0. However, if the user enters
text, then goes to another control before returning to the txtBody. That is,
the user wants to insert a placeholder list item into existing txtBody text.
In this instance txtBody=45 or whatever the actual cursor position is.
In short, whilst editing text, txtBody.selstart=0.
How can I get the position of the cursor whether the user is entering new
content, navigating within new content (I have tried using _OnChange event)
or has existing content?
Any ideas or suggestions appreciated
Many thanks, Jonathan
is a list of placeholders (for example <<Customer>> and <<Contact Full
Name>>). A user can enter some text and then insert a placeholder (later in
the code these placeholders are replaced by field values).
I use the syntax txtBody.selstart to locate the position of the cursor to
know where to locate the placeholder.
The problem is this. If the user is entering text and then double-clicks a
placeholder list item, txtBody.selstart = 0. However, if the user enters
text, then goes to another control before returning to the txtBody. That is,
the user wants to insert a placeholder list item into existing txtBody text.
In this instance txtBody=45 or whatever the actual cursor position is.
In short, whilst editing text, txtBody.selstart=0.
How can I get the position of the cursor whether the user is entering new
content, navigating within new content (I have tried using _OnChange event)
or has existing content?
Any ideas or suggestions appreciated
Many thanks, Jonathan