aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how the browse button is coming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how the browse button is coming " Watch "how the browse button is coming " New topic
Author

how the browse button is coming

nikhil govind
Ranch Hand

Joined: Mar 08, 2011
Posts: 31
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?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not change that.

Eric
Daniel Reznick
Ranch Hand

Joined: Oct 23, 2008
Posts: 50

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

Joined: Mar 08, 2011
Posts: 31
thanks Eric and Daniel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how the browse button is coming
 
Similar Threads
Problem in updating values into database
Problem with uploading images
How to to validation in java script involve two jsp page?
MultipartRequest cannot be resolved to a type
how to upload using html or javascript?