Searching for string withing string in JS issue
<p>i am using HTML5 and indexOf gives me an error, so what else can i use to search for the word "correct" in a string: <code>a001_new_quiz_multiple_choice_new_mc4_correct.html</code> which is in a variable called <code>value1</code></p>

<pre><code>function SetAPIValue(key1, value1)
{
   // alert("action is " + key1 + " and data is " + value1);
   console.log(value1);

   var str = "wrong";
   var n = str.search(value1);
   if (n &gt; 0)
     alert("found");
}
</code></pre>

<p>the error i get: 0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'indexOf'</p>
