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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -