brentd28
05-09-2006, 05:17 PM
Attached is a piece of code that I am using in a dynamic form. For some reason the text input boxes created by this piece of code are passed to the $_POST php server variable in Firefox but not in IE. What have I missed? (I am extremely new to DHTML / Javascript so please forgive me if I am missing something obvious.)
function addDoc() {
arrInputValue[arrInput.length] = new Array(0);
for (intX=0;intX<idents.length;intX++) {
arrInputValue[arrInput.length][intX]="";
}
arrInput.push(arrInput.length);
intQ = arrInput.length -1 ;
docid = "doc_"+intQ;
var newdoc = document.createElement("span");
document.getElementById('AR').appendChild(newdoc);
newdoc.id = docid;
oElement = document.getElementById(docid);
for (intV=0;intV<idents.length;intV++) {
var newipt = document.createElement("input")
oElement.appendChild(newipt);
newipt.type='text';
newipt.id=idents[intV]+arrInput[intQ];
newipt.name=idents[intV]+arrInput[intQ];
newipt.size=boxsize[intV];
newipt.value=arrInputValue[intQ][intV];
newipt.maxlength=boxmaxchr[intV];
oElement.innerHTML += " ";
}
document.getElementById(docid).innerHTML +="<input type='button' onclick='javascript:addBlurb("+ intQ +",1)' value='Add blurb'><br><span id='blurbs_"+ intQ +"'><b>Blurbs:  </b></span><br><br>";
blurbs[intQ] = new Array(0);
location.hash = 'bottom';
}
function addDoc() {
arrInputValue[arrInput.length] = new Array(0);
for (intX=0;intX<idents.length;intX++) {
arrInputValue[arrInput.length][intX]="";
}
arrInput.push(arrInput.length);
intQ = arrInput.length -1 ;
docid = "doc_"+intQ;
var newdoc = document.createElement("span");
document.getElementById('AR').appendChild(newdoc);
newdoc.id = docid;
oElement = document.getElementById(docid);
for (intV=0;intV<idents.length;intV++) {
var newipt = document.createElement("input")
oElement.appendChild(newipt);
newipt.type='text';
newipt.id=idents[intV]+arrInput[intQ];
newipt.name=idents[intV]+arrInput[intQ];
newipt.size=boxsize[intV];
newipt.value=arrInputValue[intQ][intV];
newipt.maxlength=boxmaxchr[intV];
oElement.innerHTML += " ";
}
document.getElementById(docid).innerHTML +="<input type='button' onclick='javascript:addBlurb("+ intQ +",1)' value='Add blurb'><br><span id='blurbs_"+ intQ +"'><b>Blurbs:  </b></span><br><br>";
blurbs[intQ] = new Array(0);
location.hash = 'bottom';
}