Hi) I needed to make it possible for the user to upload many files from many directories of his pc to server. Here is the html and js code
html
<div id="addPhoto" >
Path and Title of the Photo.
<br /><br />
<input type="file" name="flImg0" />
<input type="text" name="txtTtl0" />
<input type="hidden" name="addN" value="0" />
</div>
<input type="button" value="Add another" name="btnAdd" onclick="AddMore();"/>
js
function AddMore()
{
var i = document.frmExhbt.addN.value;
i=parseInt(i);
i++;
document.frmExhbt.addN.value=i;
addPhoto.innerHTML = addPhoto.innerHTML +"<br/><input type='file' name='flImg'+ i>";
addPhoto.innerHTML = addPhoto.innerHTML +" <input type='text' name='txtTtl'+ i>";
}
This works for making more text fields and fields for uploading files. BUT, but when i select first file to upload, and then the second..the first one seems to disappear. Although the same doesn't happen for textfields. Thanks for help.