Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

browse image for input type = file 1

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
How can I have a custom browse button for an input type=file?
 
Hi mate,


You need to use a workaround which includes a hidden field.

Filename:
<input type=file
name='file1'
size='15'
style='display: none;'>
<br>

<input type='text'
name='file2'
id='file2'>

<img src='browse.gif'
name='brower'
id='brower'
width='83' height='24' border='0'
alt=''
align='absmiddle'
onclick='document.all.file1.click();

document.all.file2.value=document.all.file1.value'>

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top