Hello,
I'm searching a solution to get the position of the cursor in a text field. Can anyone help me?
So if We have a bit of code like this:
<HTML>
<SCRIPT language = "javascript">
function getCursorPos(elem){
...
}
</SCRIPT>
<BODY>
<INPUT type = "text" id = "textField">
<INPUT type = "button" value = "Display cursor position" onClick = "javascript:alert(getCursorPos(document.getElementById('textField')));">
</BODY>
</HTML>
Does someone know what to write in place of the getCursorPos function...
I'm searching a solution to get the position of the cursor in a text field. Can anyone help me?
So if We have a bit of code like this:
<HTML>
<SCRIPT language = "javascript">
function getCursorPos(elem){
...
}
</SCRIPT>
<BODY>
<INPUT type = "text" id = "textField">
<INPUT type = "button" value = "Display cursor position" onClick = "javascript:alert(getCursorPos(document.getElementById('textField')));">
</BODY>
</HTML>
Does someone know what to write in place of the getCursorPos function...