Some recomendaition! You need change the function this way:
function doIt(obj, fm) { if($('input.upload').size() > fm) {alert('Max files is '+fm); obj.value=;return true;} $(obj).hide();
$(obj).parent().prepend('<input type="file" class="upload" name="fileX[]" />').find("input:first").change(function(){doIt(this, fm);}); var v = obj.value; if(v != ) {
$("div#files_list").append('.find("input").click(function(){ $(this).parent().remove(); $(obj).remove(); return true; }); }
};