Jenosavel
08-28-2008, 06:25 PM
I'm getting an Expected Identifier error in IE. Usually this is a relatively simple thing to fix, caused by an extra comma or accidentally using a keyword for a variable name. However, this time I'm really quite stumped as to what's causing it. It's coming up from the second line in the following code:
for (i=0;i<allinputs.length;i++) {
newgriff = document.createElement("input");
newgriff.type="hidden";
newgriff.class="ordgriff";
newgriff.name="g"+i;
newgriff.value=allinputs[i].id.substring(3);
p.appendChild(newgriff);
}i, p, allinputs, and newgriff are previously defined variables.
Anyone know what's causing the error?
for (i=0;i<allinputs.length;i++) {
newgriff = document.createElement("input");
newgriff.type="hidden";
newgriff.class="ordgriff";
newgriff.name="g"+i;
newgriff.value=allinputs[i].id.substring(3);
p.appendChild(newgriff);
}i, p, allinputs, and newgriff are previously defined variables.
Anyone know what's causing the error?