<?php $uploadNeed=3 ; for($i=0;$i<$uploadNeed;$i++) { ?>
<div class="smWidth">
<input type="file" name="upload_file" value="" id=" " OnClick="alert("
2 ");" />
<br />
<div class="clear">
</div>
</div>
<?php } ?>
I am able to create three file upload fields, but i want to add a new input file filed only when i select a file…. it should keep on increasing…. something like Facebook style file upload where you select a file for the first field, then the next popup’s…
I am actually checking for click event of browse, but it does not work…
Here is a very basic pure-JS implementation – hopefully it will give you a nudge in the right direction…