Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2009
    Location
    United Kingdom
    Posts
    161
    Thanks
    6
    Thanked 28 Times in 28 Posts

    Add text to current selection

    I have a function that will add text to the end of my text box. I want to be able to have the text added where it is currently selected.

    My current code is :

    Code:
    function smilie (smilie) {
            var detail = document.form1.detail;
            detail.value += smilie;
            detail.focus();
            return;
    }

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,300
    Thanks
    203
    Thanked 2,561 Times in 2,539 Posts

  • Users who have thanked Philip M for this post:

    Killermud (05-14-2009)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •