This project has moved and is read-only. For the latest updates, please go here.

input file element always display none in chrome

May 28, 2014 at 8:20 AM
hi, experts, I debug long time for the issue that input file element in neatupload always set as display none by chrome.

the finding is that this line make chrome have that behaviour.
    inputFileElem.setAttribute("id", numf.ClientID + "_NeatUploadInternalInputFile");
in the function AddFileNamesElem()
function AddFileNamesElem()
    {
        var inputFileElem = document.getElementById(numf.ClientID);
        inputFileElem.setAttribute("id", numf.ClientID + "_NeatUploadInternalInputFile");
        var fileNamesElem = document.createElement("input");
        fileNamesElem.setAttribute("id", numf.ClientID);
        fileNamesElem.type = "hidden";
        fileNamesElem.name = "NeatUploadInternalFileNames_" + numf.ClientID;
        fileNamesElem.value = "";
        inputFileElem.parentNode.insertBefore(fileNamesElem, inputFileElem);
    }
if I comment the line
    inputFileElem.setAttribute("id", numf.ClientID + "_NeatUploadInternalInputFile");
, the input file element shows again.

how to solve this?