Hello,
I have a <p id=’newimage’></p> area in which I create a file input area after a user has clicked ‘add img’ using this function:
(snippet)
function changeimg(){
para = document.getElementById(“newimage”);
imgBox = document.createElement(“input”);
imgBox.type = file;
imgBox.name = image;
para.appendChild(imgBox);
}
The input area gets created fine. Trouble is, when the form gets submitted, there is no post data for any $FILES[‘image’][‘name’] !!
I have my enctype in the form header & I tried using a normal <input type=’file’ name=’image’> and that works fine. So why doesn’t the one I create with the javascript work??
*puzzled
any help is great ?