javascript date and loop check
<p>Hey all, this is the code i have to check for a day thats equal to the list of days in the comma seperated list:</p>

<pre><code>for(var i = 0; i &lt; daysHidden.length; i++){
   if (daysHidden[i] == d.getDate());
   {
      alert(daysHidden[i] + '=' + d.getDate());  
   }
}
</code></pre>

<p>the daysHidden = 1 (its the only thing in the list April 1st is already gone and todays the 2nd so 1 is the only one in the list)</p>

<p>and d.getDate() has 1-30 (for april)</p>

<p>When i run the code, however, it keeps looping through the if code when it should only loop once (when it finds that 1=1</p>

<p>However, i keep getting the alert box that says:</p>

<p>1=1</p>

<p>1=2</p>

<p>1=3</p>

<p>etc.... 1=30</p>

<p>So i do not know what i am doing incorrect? I already tried putting them as strings:</p>

<pre><code> if (daysHidden[i].ToString == d.getDate().ToString);
</code></pre>

<p>But that doesnt seem to work.... Any help would be great :)</p>

<p>David</p>
