Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
78
rated 0 times [  82] [ 4]  / answers: 1 / hits: 17603  / 11 Years ago, fri, october 11, 2013, 12:00:00

I have an input box and I want user to click on the input box to show the open file dialog and show the filename in the same input box. But if I use the input type=file, it will show the choose file button, I dont wan to show the button. How can I do it?



html:



<div class=fileupload>
<input type=file class=file name=image />
</div>

<div class=fileupload>
<input type=file class=file name=attachement />
</div>


http://jsfiddle.net/EctCK/
** I dont wan this, how do I hide the choose file button?


More From » jquery

 Answers
8

You can overlay a transparent <input type=file/> over a styled button or other element.



<input type=file style=opacity:0;/>


See this JSFiddle for a working demo.


[#75076] Thursday, October 10, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jaredsages

Total Points: 273
Total Questions: 97
Total Answers: 105

Location: French Southern and Antarctic Lands
Member since Fri, Jan 6, 2023
1 Year ago
jaredsages questions
;