I just want to know: is there any way to remain the upload files (not yet uploaded to server) in a submit form?
I have a page, in that page I have multiple upload files and I also have a 1st drop down list that will populate a 2nd drop down menu (the data retrieve from database). So in my case, when the user chooses (a) file(s) to upload, the file name will display below the browse button. My problem is, when the user clicks on the 1st drop down list, I have to post the form, so that it will populate the 2nd drop down list and the file(s) that have been chosen will disapear.
Here is my code:
<script src="jquery-1.9.1.min.js" type="text/javascript" language="javascript"></script>
<script src="jquery.MultiFile.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript">
$(function(){ // wait for document to load
$('#picture').MultiFile({
STRING: {
remove: '<img src="bin.gif" height="16" width="16" alt="x"/>'
}
});
});
</script>
<form action="upload_file.php" method="post" enctype="multipart/form-data" >
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<label for="file">Filename:</label>
<input type="file" name="picture[]" id="picture" ><br>
And here is the drop down menu code:
onchange="this.form.submit();"
can't you receive your data for Dropdown 2 using ajax? then u need not to submit all the user files....
cheers