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
    Ute
    Ute is offline
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find selected Part of the contents of textfield and modify it.

    Hi,
    I would like to build a script that can find out which part of the contents of a textfield was selected by a user and put html-strings in front and behind that selection onclick of a button.

    For example:
    The user enters a text into the textfield. He then selects a part of this text and clicks on a button and the javascript puts a <b> tag in front of the selected string and a </b> tag behind it.

    I don't know whether this is at all possible or how simple that is. Sorry if this is very basic.

    Thank you for any help.

    Regards,
    Ute

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    If you search the Post a JavaScript forum, you should be able to find something in there. These types of scripts are not very browser friendly.


  •  

    Posting Permissions

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