i found this javascript is called by a button but i want it to be onload at the same time , when button click it will call this javscript as well but i not sure how? hopefully anyone of you can help out
function AddFileUpload()
{
var div = document.createElement('DIV');
div.innerHTML = '<input id="file' + counter + '" name = "file' + counter + '" type="file" /><input id="Button' + counter + '" type="button" value="Remove" onclick = "RemoveFileUpload(this)" />';
document.getElementById("FileUploadContainer").appendChild(div);
counter++;
}
/>is most probably incorrect. Just omit that additional slash. This is most probably not the cause of your original problem, though. I suggest to use FireBug or any similar debugger to see what's going wrong (perhaps there is noFileUploadContainerelement orcounteris not defined ....).