Hello newage24,
The indexof function is working correctly finding Hon in Honda.
But I suppose that is not what you want.
You would be better using a regular expression to find a whole word only match.
See : http://www.juicystudio.com/...vascript/regexp.html
for explanations and a few examples of how to do this.
See also : http://developer.netscape.com/...e/angus_strings.html
for " Example 1 " which may be close to your desired result.
Hope this helps.
kode
The indexof function is working correctly finding Hon in Honda.
But I suppose that is not what you want.
You would be better using a regular expression to find a whole word only match.
See : http://www.juicystudio.com/...vascript/regexp.html
for explanations and a few examples of how to do this.
See also : http://developer.netscape.com/...e/angus_strings.html
for " Example 1 " which may be close to your desired result.
Hope this helps.
kode