Jump to content


Photo

Cursor location store and return help!


  • Please log in to reply
1 reply to this topic

#1 assasin

assasin
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 September 2006 - 07:29 PM

I need a script that will store the location of the cursor so when a button is clicked it can insert some text where the cursor was in the txt box.

Here is a link to a script I found by googleing but it only works in IE and I need mine to work in FIreFox and IE.

Basicly I am making a BB code WYSIWYG interface! so when say a smiley image is clicked the html will be inserted into the text box at the cursors last location.

Can anyone help?

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 20 September 2006 - 01:28 PM

I suggest you take a look here: http://www.bazon.net...epl?art_id=1292.

Basically, you need to use a TextRange in IE, and handle the selection in FF.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users