title: page doesn't stop loading - javascript
body: <p>what does it mean if the twirly thing in the tab of the page wont stop spinning, ie saying its loading?</p>
  
  <p>i have a php for loop and in each one of these it throws out i have a javascript onload function with a for loop looking to see if that id (from mysql) is in the javascript cookie array.
  hope that makes sense. it all works fine but wont stop loading.
  anyway, i've played around with break and return false which stop the loading but then doesnt give me the results i want.</p>
  
  <p>can anyone point me in the right direction?
  thanks</p>
  
  <p>this is the javascript function that is being called by an onload in the img tag that each loop created by the php for function is throwing out.
  n is the id. secondarray is the cookie data put into a readable array.</p>
  
  <pre><code>function cookietest(n)
  { 
  for (i = 0; i &lt; secondarray.length; i++) 
  { 
  if (secondarray[i] == "ca[]="+n  ) document.getElementById(n).src = "saved.png" ;
  }
  }
  </code></pre>