/    Sign up×
Community /Pin to ProfileBookmark

window.focus()

Hi,
I am creating a virtual keyboard. I have a page with one textbox. There is a link next to this textbox that when a user clicks on, a small vitual keyboard window pops up on top of the window containing the textbox. When a user clicks on the keyboard keys, the letters get typed into the textbox. I managed to do all this but I want the cursor to show on the textbox.

How do I make the cursor show on the textbox?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@FangNov 19.2007 — Reset the caret/cursor position after each virtual keyboard eventdocument.getElementById('textarea1').focus();
×

Success!

Help @Seboko spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...