It's not a secret anymore!
The moose likes HTML, CSS and JavaScript and the fly likes Uploading files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Uploading files" Watch "Uploading files" New topic

Uploading files

ram gaurav
Ranch Hand

Joined: Mar 29, 2006
Posts: 208

I am creating one application in which i have to upload word documents.

I have created BROWSE button through:

What i want that , when user click BROWSE then file chosser dialog box will get open , in that user can only able to select WORD documents.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Rumor has it that there is an accept attribute, but it is not in any spec docs so I think you are out of luck. Best you could do is clientside validation to check the file type.

ram gaurav
Ranch Hand

Joined: Mar 29, 2006
Posts: 208
Consider Paul's rocket mass heater.
subject: Uploading files
jQuery in Action, 3rd edition