i have a form that contains 3 File inputs.i want to send it via jquery.i tried serialize function in jquery,but i realized that this function don't send file inputs!
here is my form :
<form id="submit_pics" action="#" >
file 1 : <input name="file1" id="file1" type="file" /><br />
file 2 : <input name="file2" id="file2" type="file" /><br />
file 3 : <input name="file3" id="file3" type="file" /><br />
<br />
<div>
<a id="submit" href="javascript:;" ><img src="uploads/images/button1.png" /></a>
</div>
</form>
and this is my javascript code :
<script type="text/javascript">
$(document).ready(function(){
$("#level3").click(function(event) {
var str = $("#submit_pics").serialize();
$.ajax({
type: "POST",
url: "track.php",
data: str,
success: function(theResponse) {
$('#req_result').html(theResponse);
}
return false;
});
});