Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Find for a text area?

 
john klucas
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Text Area, find button and a field in front of that where user will type in what he wants to search for. i working on an application.
I want to have the similar kind of functionality for this application which u have for(Edit -> find(on a page) option in any browser(IE)). I am reading the data and displaying it in a Text Area.
can u help me out?
Thanx in advance.

 
Daniel Searson
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll want to grab the text from the text area using the getText() method. You can then search for the String you want within that String using the methods in the String class (look them up in the API docs).
- Daniel
 
john klucas
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you show me some sample code?
i will appreciate it!
 
john klucas
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i set the srchstart index to zero? If i want to start finding a new word, i want find to search for a word again from the zero index.
 
Paper has not yet been outlawed – so let your Java Swing application print with wild abandon: JPDF
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!