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