javascript - Changing style of file browse button (MyFaces inputFileUpload) -
my task implement css style submit button of file upload widget. decided make original widget invisible , add text field , button visible , have styles need , can use functionality of original widget.
<t:inputfileupload id="fileupload" style="display:none" value="#{handler.upfile}" accept="application/pdf,image /tiff" onchange="handlechange();"/> <input type="text" id="filename" class="input400px" readonly = "readonly"/> <input type="button" id="fakebrowse" class="browsebutton" value="browse..." onclick="handlebrowseclick();"/> function handlebrowseclick() { var fileinput = document.getelementbyid("uploadform:fileupload"); fileinput.click(); } function handlechange() { var fileinput = document.getelementbyid("uploadform:fileupload"); var textinput = document.getelementbyid("filename"); textinput.value = fileinput.value; }
it works in firefox, not in ie. suppose click() doesn't work in ie. has ideas how can solve problem ie , why doesn't work there? thank you.
Comments
Post a Comment