Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting part of string from input text

Status
Not open for further replies.

Endbringer

Technical User
Jan 18, 2002
28
US
Hi!

I've got a <input> text tag that someone types in their search item. What I want to do is do a search that's like a Contains on a string.
Now my problem is, if the item i want to find is called &quot;State of Franklin Bikeway&quot; and the person types in &quot;state&quot;, how do I make it where it will do a search on the full name using the partial? Is this where the substring() function is better? or is there a contains() function?

Robert

&quot;Women are like alcohol. They're great at first but give you a headache the next day.&quot;
 
I think the function you want is indexOf. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top