I have a text field named "startDate". As the user enters a date in the text field, it will convert all lower case charaters to upper case. The source code is attached below. The user can't make changes in the text field because of 2 problems. First, the user can't use the arrow keys to move the cursor to the position they want because I used the onkeyup event. As the user presses the arrow key once, the cursor will go back to the last position of the input. Second, I can use the mouse to move the cursor to the position I want. However, as I use the Backspace key to erase the character I want to change, the cursor will go back to the last position of the input. My questions are: 1) How to keep track the cursor positon in a text field? 2) How to set the cursor position?
Thank you for your help.
Eva
<font face="arial" color="FFFFFF"><small><b>Travel Start Date: </b></small></font><br>
<input name="startDate" onkeyup="startDate.value=startDate.value.toUpperCase();" value="" size="20">
Thank you for your help.
Eva
<font face="arial" color="FFFFFF"><small><b>Travel Start Date: </b></small></font><br>
<input name="startDate" onkeyup="startDate.value=startDate.value.toUpperCase();" value="" size="20">