<div>I want to upload file,but i don&#39;t want to display the inputtext and button as system designed ,so i hiddened it .</div>
<div>I&#39;d like to place a button to call the uploadfile button which is hidden.</div>
<div>&nbsp;</div>
<div>My code is like this:</div>
<div>&nbsp;</div>
<div>&lt;x:inputFileUpload <br>&nbsp; id=&quot;applyFile&quot;&nbsp; style=&quot;display:none&quot; name=&quot;applyFile&quot;<br>&nbsp; value=&quot;#{Apply_ListPage.applyFile}&quot;<br>/&gt;</div>
<div>&nbsp;</div>&lt;input type=&quot;submit&quot;&nbsp; name=&quot;applyupload&quot; value=&quot;¥¢¥Ã¥×¥í©`¥É&quot;<br>&nbsp;&nbsp;&nbsp;onclick=&quot;uploadfile(&#39;doApplyUpload&#39;,&#39;applyFile&#39;)&quot; id=&quot;doApplyUpload&quot;/&gt;
<div>&nbsp;</div>
<p>function uploadfile(btna, btnb) {</p>
<p>&nbsp;var buttona = document.getElementsByName(btna);<br>&nbsp;var buttonb = document.getElementsByName(btnb);<br>&nbsp;buttonb.click();<br>}</p>
<div>It doesn&#39;t work. Why?</div>
<div>&nbsp;</div>
<div>Is there any other way to achieve my&nbsp;goal.</div>