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 1 of 1
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    searching a key-word in text inside textarea

    Code:
    <input type="text" value="" name="find"> 
    <input type="submit" value="find keyWord in the textarea below">
    
    
    <textarea name="message"
              cols="70"
              rows="10">This is my text in textarea.</textarea>

    The above code is a temperal code which explains what I am trying to do and which doesn't really work.

    The value of the message in the textarea "This is my text in textarea" is very short but it is very long actually.

    I like to make it like the following.

    If I put my mouse before the word "This" and enter "i" in the input box and click the submit button,
    then the cursor goes to before the letter "i" in the word "This."

    If I put my mouse before the word "my" and enter "i" in the input box and click the submit button,
    then the cursor goes to before the letter "i" in the preposition word "in."

    If I put my mouse before the word "my" and enter "a" in the input box and click the submit button,
    then the cursor goes to before the first letter "a" in the word "area."

    If I put my mouse before the word "This" and enter "ex" in the input box and click the submit button,
    then the cursor goes to before the first letter "ex" in the word "text."

    Can I do it with your help?
    Last edited by joonstar; 04-20-2005 at 01:27 AM.
    Get my greedy up


 

Posting Permissions

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