Can anyone tell me why this code is acting like this? I’m using VS 2010. There are a ton of other functions in this library that use the .indexOf() object with no problems. I don’t know what I’m doing wrong here. I’ve research the .indexOf() object and I’m using it as I’ve seen used in book and online examples.
What’s going wrong is that you are trying to use it on an element, when it should be used on a string or (if using JavaScript v1.6 or better) on arrays.