I have a link which generates file upload fields through a JavaScript function. However, when I add an upload field, then select a file, then add another field, the file disappears from the first field. I don't see why this should be happeneing.
jsFiddle: http://jsfiddle.net/etCqD/
Note that the jsFiddle gives an error 'addPhoto() is not defined' which I also don't understand as the function is clearly defined in the JavaScript section. This error doesn't happen on my actual page. Can someone tell me what's going on here?
onload. That means thataddPhotois scoped to that function and not accessible form outside it (e.g. from the intrinsic event attribute that you should not be using anyway)