Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript function doesn't load on Chrome
    primarykey
    data
    text
    <p>I have a javascript function that you can see here</p> <pre><code>function tot() { for(var i=1;i&lt;13;i++) { var a = parseFloat(document.getElementById('c'+i).innerHTML); var b = parseFloat(document.getElementById('k'+i).innerHTML); var c = parseFloat(document.getElementById('w'+i).innerHTML); var d = parseFloat(document.getElementById('g'+i).innerHTML); var e = a+b+c+d; document.getElementById('t'+i).innerHTML = e; } } </code></pre> <p>As you can see, I only need to do calculate the result between a+b+c+d. The HTML code of the elements is the following:</p> <pre><code>&lt;label id="c1"&gt;0&lt;/label&gt; &lt;label id="k1"&gt;0&lt;/label&gt; &lt;label id="w1"&gt;0&lt;/label&gt; &lt;label id="g1"&gt;0&lt;/label&gt; &lt;br /&gt; &lt;label id="t1"&gt;0&lt;/label&gt; &lt;br /&gt; &lt;label id="c2"&gt;0&lt;/label&gt; &lt;label id="k2"&gt;0&lt;/label&gt; &lt;label id="w2"&gt;0&lt;/label&gt; &lt;label id="g2"&gt;0&lt;/label&gt; &lt;br /&gt; &lt;label id="t2"&gt;0&lt;/label&gt; ... </code></pre> <p>The labels' values of c, k, w and g increments until 12. The problem is that when I call this function on Firefox, it works perfectly but wh I use google Chrome, it doesn't. I don't see any calculation.</p> <p>Do you know why?</p> <p>I the function is stored in an external file called <code>conti.js</code> and I call it in this way:</p> <pre><code>&lt;script src="conti.js"&gt;&lt;/script&gt; </code></pre> <p>That code is inside the tag. <a href="http://jsfiddle.net/SQ6kp/" rel="nofollow">jsfiddle</a></p>
    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.
    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