I have several fields that where the user will tab from field to field to enter or change data. When the user tabs into a field I would like to highlight everything that is in the field so that it is easy to replace data. I tried the following:
I made a method with the following code:
elements.cg_hours.selectAll();
I then linked it to the onFocusGained property. When I tried it, the cursor seemed to click on and off really fast. I was not able to enter data at all. I turned it back off again. That obviously didn’t work.
So how do you select all the contents of a field when you tab into it?