November 21st, 2010, 05:24 PM
HTA: Textarea focusing issue
Wasn't quite sure where to put this thread so feel free to move it if necessary.
I'm writing a small HTA application, written in HTML and using VBScript for the actions.
The purpose of the application is to display data stored text files, as well as to edit the same data.
To do this I am using html textarea fields to display the data, whilst also allowing it to be editted.
Now, whilst everything is working fine and I can display data as well as edit it and save to file, the issue that I am having is that when I click on the textarea the cursor does not go to the end of the text already in the box, rather it goes back to the beginning.
As I have a number of textareas I am constantly clicking between each to add data to one, delete from another, modify another etc. So it is a royal pain that each time I click I then have to use the keys to move the cursor to the end of the current text to add further text!
If anyone has any idea how I can make the cursor stop this, it would be much appreciated.
My ideal solution would be to have the cursor stay wherever I click, so that I can click and edit, but I would also settle for the cursor going to the end of the textarea rather than the beginning.
Furhtermore, if anyone has any idea how I could do all of this without using textareas I would love to hear it, it's just the only way that I could think to do it.