/    Sign up×
Community /Pin to ProfileBookmark

Feel what is selected in a text area? (First post here)

Hello! ?

My first post here.

I do have a “text area”(with a scroll list) that have data inserted from a mySQL db.

Example:

Snakes: 3
Birds: 12
Cats: 4
Dogs: 7

On the page there is also a “+” and a “-” button to increase/decrease the amount on the selected animal.

Is it possible to “feel” what is is selected so I know where to add in the database?

Thanks in advance.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@7studJan 24.2005 — I don't know about whether you will feel your user's selections, but you can get the selected text:

http://www.webreference.com/js/column12/textrange.html
×

Success!

Help @Pellefant 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...