View Full Version : How to get char at current cursor position in textarea?

02-22-2003, 01:12 AM
I'd like to know how to get the character at the current cursor position in the textarea. I am new to Javascript and I couldn't find this on the internet. Please help.


02-22-2003, 02:49 AM
Actually, I don't believe there is any way to do that, which is cross-browser, if it's even possible. I could be wrong though, I'm not one of the better javascript gurus here. ;)

I do recall quite a few posts dealing with this subject from the old forum though, if I remember right this isn't possible?

02-22-2003, 03:00 AM
In Gecko, this is trivial:

Assume the variable textBox is a reference to the textbox:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum