03-29-2009, 06:06 PM
[eluser]yannyannyann[/eluser]
[quote author="phazei" date="1233844324"]I suppose after you post you stop racking your mind so the solution comes to you… like not disabling the <input type=file> in the preSubmit function without using setTimeout…[/quote]
Can you explain more in details ?
I have the some problem as you had and I'd like to slove it
I have one file to upload and this is my jQuery :
[quote author="phazei" date="1233844324"]I suppose after you post you stop racking your mind so the solution comes to you… like not disabling the <input type=file> in the preSubmit function without using setTimeout…[/quote]
Can you explain more in details ?
I have the some problem as you had and I'd like to slove it

I have one file to upload and this is my jQuery :
Code:
jQuery("#addVideoForm").validate({
rules: {
userfile: {
required: true,
accept: "mov|avi|mpg|flv"
}
},
submitHandler: function(form) {
jQuery(form).ajaxSubmit({
target: '#positive-result',
beforeSubmit: showRequest,
success: showResponse
});
}
});
function showRequest(formData, jqForm, options) {
$('#result').fadeIn("slow");
$('#positive-result').html("Upload en cours...");
var queryString = $.param(formData);
return true;
}
function showResponse(responseText, statusText) {
$('#positive-result').html( 'La video a bien été ajoutée. <a href="<?=base_url()?>admin/videos">Retour à la liste</a>');
$('#result').fadeIn("slow");
}