wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes problem related to HTML file attribute 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 "problem related to HTML file attribute" Watch "problem related to HTML file attribute" New topic
Author

problem related to HTML file attribute

Bk Jacky
Ranch Hand

Joined: Jun 11, 2005
Posts: 74
Hi Ranchers
I made a jsp file in which i am using HTML file attribute like
this
<input type=file name=dir>
Now when i click on this button it opens a window which shows various file inthat directory . i select a ".xsd" file.
But I want that window should show only files with ".xsd" extension. Not other files.So what i hav to do so.


SCJP1.4<br />SCWCD1.5<br />"Nothing is impossible"
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

You can add the accept attribute like accept="image/jpeg" but I am not 100% sure that all browsers support this. Be sure and check the file extension either in JavaScript and/or the server side code as well to be safe.


GenRocket - Experts at Building Test Data
 
Consider Paul's rocket mass heater.
 
subject: problem related to HTML file attribute
 
Similar Threads
Question about hyperlink...
problem related to HTML file attribute
Closing window aftre submitting form
Getting null instance of XSSchemaSet when the xsd is importing another xsd (XSOM api)
Interaction of XML and XSD on the fly