Click to See Complete Forum and Search --> : Forcing Tab Key


clyde
12-13-2005, 09:08 AM
Is there a way to force the tab key on any <Input> field in the form without manually tabbing to that field.

My reason is that when the form loads the <input> field I chooses will already have a value in it and as soon as I start keying in the new value I want the old value cleared as would happen if you manually tabbed to the <input> field.

Any help appreceiated,

Clyde

konithomimo
12-13-2005, 09:21 AM
I read the original post wrong. Just use select():

document.getElementById('text1').select();

where text1 is the ID of the input that you want to focus on and highlight.