Monday, December 28, 2009

[jQuery] Multifile - help

Hi,
 
I am using Multifile plugin to select the multiple file. I am trying to get the final file count for each browser selection . Any help is appreciated.
 
Here is the sample code i am using
 
<html>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.MultiFile.js"></script>
<script>
var intVal=2;
$(document).ready(function(){
    $('#addFileButton').click(function(){addUploadFile();});  
 });
 
function addUploadFile() {
intVal++;
$('<div id="addVal'+intVal+'">Please specify a file, or a set of files (dynamically):<br>'+
   '<input type="file" class="multi" name="df'+intVal+'" id="df'+intVal+'" size="40"/></div>').appendTo('#outerVal');
$('#df'+intVal).MultiFile();
}
</script>
 
<form action="doUpload" enctype="multipart/form-data" method="post">
<div id="outerVal">
<!--p>
Type some text (if you like):<br>
<input type="text" name="textline" size="30">
</p-->
<div id="addVal1">
Please specify a file, or a set of files:<br>
<input type="file" class="multi" name="df1" size="40">
</div>
<div id="addVal2">
Please specify a file, or a set of files:<br>
<input type="file" class="multi" name="df2" size="40">
</div>

</div>
<div>
<input type="submit" value="Send">
<input type="button" class="button" value="Add File" id="addFileButton" />
</div>
</form>
</html>
 
Thanks
Jay
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate