Unable to store value in stack
<p>In this code, the <code>subKeys</code> has some values which is extract from cookie, the message prompt <code>cval: 3</code> but I could not push store each <code>subKeys</code> values into <code>stack</code> array which is the <code>stack</code> is always empty.</p>

<pre><code>var stack = new Array();
var temp = document.cookie;

//alert("cookie: "+temp);
function upSelect() {
    temp = temp.replace("tutorSelect=","");
    subKeys=temp.split(",");
    for(var i=0;i&lt;subKeys.length;i++) {
        alert("cval: "+subKeys.length);
        //push to stack?
        stack.push(String(subKeys[i]));
        alert("stack: ",stack.length);
        document.getElementById("t"+subKeys[i]).src="tta/rem.png";
    }
}
</code></pre>
