Clear file upload field?
Posted: Fri Aug 26, 2011 4:18 pm
Was not sure if this was supposed to go into this section or the HTML section
Hey ya guys and gals. Got something I'm trying to do but can't figure it out. Basically I got a page where there is a form with various things but I noticed that if wanted to clear a field for the file upload i can't because when i click on it, it opens a new window to browse to file. How do I do a 'clear' button or a different method for doing an upload field? Or how do I make a 'browse' button? I tried to Google it but I didn't see what I was looking for, at least not with out using java and I'm sure there is some inherit function or something that might work, ~shrugs~ I have no idea. Here is what I'm doing:
Hey ya guys and gals. Got something I'm trying to do but can't figure it out. Basically I got a page where there is a form with various things but I noticed that if wanted to clear a field for the file upload i can't because when i click on it, it opens a new window to browse to file. How do I do a 'clear' button or a different method for doing an upload field? Or how do I make a 'browse' button? I tried to Google it but I didn't see what I was looking for, at least not with out using java and I'm sure there is some inherit function or something that might work, ~shrugs~ I have no idea. Here is what I'm doing:
Code: Select all
<form action="upload_ac.php" method="post"
enctype="multipart/form-data">
<label for="file1">Filename1:</label>
<input type="file" name="file1" id="file1" />
</form>