/    Sign up×
Community /Pin to ProfileBookmark

First, I am making a xor encryption script and I need to know how to get the character code for a character in javascript…is this possible?

Also, I’m making a script that will where I want to be able to insert text where the user’s cursor (the blinking thing) is… is there a way to find out the location of the cursor in a text area?

Thirdly, I want the user to be able to figure out what text is selected in a text area (so a user can highlight the text, press a button and it will add html code around the selected text)…

Thanks in advance for any help!

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@CSW800authorSep 06.2004 — I just figured out the first one... So, now it's down to two questions...
Copy linkTweet thisAlerts:
@HaganeNoKokoroSep 06.2004 — I found this; I'm not really sure if it helps you or not, or if it works or not

http://www.alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript/
Copy linkTweet thisAlerts:
@CSW800authorSep 06.2004 — Yep, that's what I needed, Thanks!
×

Success!

Help @CSW800 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.13,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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