On the site I am developing, I have a file input that users can upload files from. It uses "Ajax" (not really) to send the file to a php file that is bound to an iframe. My question is that Firefox automatically fills in the file input element. Is there a way I can give users the option of clicking the submit button without sending the file? Or do I set the file value to null somehow and check for that in the php file? My code looks like this:
Name: <input type='text' id='name'><br>
Description: <textarea id='description' rows=10 columns=100></textarea><br>
<form id="upload_form" method="post" enctype="multipart/form-data" action="uploadfile.php">
<input type='hidden' value='' id='descriptionid' name='descriptionid'>
<input type='file' name="file" id="file" size="27" value="">
<input type='submit' value='Submit' onclick=';' id='submitPopup'>
</form>
When the button is clicked it runs a JavaScript method and gets the values of name and description and also submits the input form. How do I let users have the option of uploading a file, and not have it auto filled in by their browser?