Can I position the cursor at the start of a textarea (HTA and VBScript)? -
i have textarea
default text named textarea
this:
<p><textarea name="textarea">default text</textarea></p>
i set focus using:
sub window_onload textarea.focus end sub
is there way can have cursor @ start of default text
rather end? guess has "selstart" can't work out how use , google isn't helping.
sorry if basic question, it's first real hta/vbscript , i'm learning go.
thanks
textarea.focus
put cursor @ beginning of text when tested it. can move using sendkeys
method:
sub window_onload textarea.focus createobject("wscript.shell").sendkeys "^{home}" end sub
the selstart
, selend
properties apply textbox controls in visual basic forms, not html <textarea>
elements.
for more sophisticated cursor handling in textareas need javascript.
Comments
Post a Comment