• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

how the browse button is coming

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am writing a code as follows in jsp,,the html part:
i have to upload a file and save it somewhere so :

<form ENCTYPE="multipart/form-data" ACTION="fileupload.jsp" METHOD=POST>
<br><br><br>
<center>
<table border="2" >
<tr>


<td colspan="2"><p align="center"><B>PROGRAM FOR UPLOADING THE FILE</B>
</td></tr>
<tr><td><b>Choose the file To Upload:</b></td>
<td><INPUT NAME="F1" TYPE="file"></td></tr><tr><td colspan="2">
<p align="right"><INPUT TYPE="submit" VALUE="Send File" ></p></td></tr>
</table>
</center>
</form>


it gives a browse button automatically....how can i change its name ...is it by default ...if yes how its working?
 
author
Posts: 15385
6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not change that.

Eric
 
Ranch Hand
Posts: 50
jQuery Eclipse IDE Google App Engine
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well...

Actually the thing you need to do is: You need to hide the default button, and instead of it put you own custom button that will call the action of the original one


I did it once...

You can either do it with css or you can do it with jQuery

here couple useful google search strings :

1) INPUT TYPE="file" how to make a custom button
2) how to customise the input file button

and here couple of website i found with it :

http://tiagoe.blogspot.com/2010/01/css-style-typefile-tags.html
http://www.quirksmode.org/dom/inputfile.html
http://www.viget.com/inspire/custom-file-inputs-with-a-bit-of-jquery/
http://www.filamentgroup.com/lab/jquery_custom_file_input_book_designing_with_progressive_enhancement/
http://stackoverflow.com/questions/5813344/how-to-customize-html-input-type-file

Hope it helps you,

Regards,

Daniel.
 
nikhil govind
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Eric and Daniel
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic