<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
<TITLE>Javascript Question</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">Did you ever figure out how to get the cursor position in a textarea field????</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Let me know...</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Your message below:</FONT>
</P>

<P><FONT FACE="Times New Roman">Dan- I just tried it and it actually gives the position of the mouse and not the blinking text cursor (sorry I didn't make that clear).</FONT></P>

<P><FONT FACE="Times New Roman">&nbsp;David &gt;<I> -----Original Message-----</I> &gt;<I> From: Dan Costea [</I></FONT><A HREF="mailto:HYPERLINK "><I><U><FONT COLOR="#0000FF" FACE="Times New Roman">mailto:HYPERLINK &quot;mailto:costea.dan@ssi-schaefer.ro&quot;</FONT></U><U><FONT COLOR="#0000FF" FACE="Times New Roman">costea.dan@ssi-schaefer.ro</FONT></U></I><I></I></A><I></I><I><FONT FACE="Times New Roman">]</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> Sent: Tuesday, January 29, 2002 10:28 PM</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> To: </FONT></I><A HREF="mailto:javascript@LaTech.edu"><I></I><I><U><FONT COLOR="#0000FF" FACE="Times New Roman">javascript@LaTech.edu</FONT></U></I><I></I></A><I></I><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> Subject: Re: [Javascript] Get the position of the cursor in a</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> textarea?</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> Yes, it is possible. I didn't made the code for NS, but with</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> IE4+ you can</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> run the following code:</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &lt;body onMouseMove=&quot;document.all['asdf'].innerHTML = 'xPos: '</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> + event.x +</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> '&lt;br&gt;yPos: ' + event.y &quot;&gt;</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &lt;div id=&quot;asdf&quot;&gt;&lt;/div&gt;</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &lt;br&gt;</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &lt;textarea rows=4 cols=35&gt;this is a textarea ... &lt;/textarea&gt;</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &lt;/body&gt;</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt; Hi all. Is it possible to get the position of the cursor</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> in a textarea?</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt; E.g. let's say I have:</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt;</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt; Hello there, Welcome to 12345 company.</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt;</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt; in a textarea, and the cursor is currently after the word</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> Hello. So I</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> would</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt; like a value of 6 returned by such a javascript function. Thanks!</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt;</FONT></I> <FONT FACE="Times New Roman">&gt;</FONT><I><FONT FACE="Times New Roman"> &gt; David</FONT></I> </P>
<BR>

<P><B><FONT COLOR="#800000" SIZE=2 FACE="Arial">Matt Bushman,</FONT> <FONT COLOR="#000080" SIZE=2 FACE="Arial">IT Analyst</FONT></B>
<BR><B><FONT COLOR="#000000" SIZE=2 FACE="Arial">Rochester Public Utilities</FONT></B>
<BR><B><FONT COLOR="#000000" SIZE=2 FACE="Arial">4000 East River Road NE</FONT></B>
<BR><B><FONT COLOR="#000000" SIZE=2 FACE="Arial">Rochester, MN 55906</FONT></B>
<BR><B><FONT COLOR="#800000" SIZE=2 FACE="Arial">Phone:</FONT><FONT SIZE=2 FACE="Arial"> </FONT><FONT COLOR="#000080" SIZE=2 FACE="Arial">507-280-1536</FONT></B>
<BR><B><FONT COLOR="#800000" SIZE=2 FACE="Arial">Email:</FONT><FONT SIZE=2 FACE="Arial"> </FONT><FONT COLOR="#000080" SIZE=2 FACE="Arial">msbushman@rpu.org</FONT></B>
</P>

</BODY>
</HTML>