Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting round the chrome and FF background tab processing errors for javascript
    primarykey
    data
    text
    <p>Ok im really stuck ive been working on this all day and i just cant fatherm it out. </p> <p>I have a javascript slideshow that uses setTimeout(). i understand that in chrome and some FF versions that it will slow down to reduce cpu usage and then speed up to catch up where it thinks it should be in the slideshow when i return to it.</p> <p>However in doing this it not only speeds up but also ignores some of the questions in my code to jump out of my image array causing a brief undefined error. Which is just boggling Once it catches up it then runs fine??? im stuck any ideas how i can get round this and how to stop it from speeding up also?? this is the code im using.</p> <pre><code>&lt;script type="text/javascript"&gt; </code></pre> <pre class="lang-js prettyprint-override"><code>&lt;?php $fetch_images = mysql_query($Aquery); $fetch_title = mysql_query($Bquery); $fetch_text = mysql_query($Cquery); $num_rows = mysql_num_rows($fetch_images); ?&gt; var i=0; var products = [&lt;?php while($image = mysql_fetch_array($fetch_images)){echo "'".$image['imageurl']."',";}?&gt;]; var productstitle = [&lt;?php while($title = mysql_fetch_array($fetch_title)){echo "'".$title['title']."',";}?&gt;]; var productstext = [&lt;?php while($text = mysql_fetch_array($fetch_text)){echo "'".stripslashes($text['strapline'])."',";}?&gt;]; function slideShow&lt;?php echo $timerTag;?&gt;(){ if (i&lt;=(products.length-1)){ $('#headerslideimage').fadeTo("slow", 0, function() { &lt;?php if(page('pageurl') != 'home'){?&gt; document.getElementById('headerslidetitle').innerHTML=productstitle[i]; document.getElementById('headerslidetext').innerHTML=productstext[i]; &lt;?php }?&gt; document.getElementById('headerslideright').innerHTML="&lt;img id='headerslideimage' src='"+products[i]+"' alt='"+productstitle[i]+"'/&gt;"; i++; $('#headerslideimage').fadeTo(4000, 100, function() {}); }); } else { i = 0; $('#headerslideimage').fadeTo("slow", 0, function() { &lt;?php if(page('pageurl') != 'home'){?&gt; document.getElementById('headerslidetitle').innerHTML=productstitle[i]; document.getElementById('headerslidetext').innerHTML=productstext[i]; &lt;?php }?&gt; document.getElementById('headerslideright').innerHTML="&lt;img id='headerslideimage' src='"+products[i]+"' alt='"+productstitle[i]+"'/&gt;"; i++; $('#headerslideimage').fadeTo(4000, 100, function() {}); }); } setTimeout("slideShow&lt;?php echo $timerTag;?&gt;()", 5000); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload