Fóruns sobre PHP, JavaScript, HTML, MySQLi, jQuery, Banco de Dados, CSS
Moderador: web
![]() |
0 |
![]() |
0 |
![]() |
0 |
![]() |
0 |
$(document).ready(function(){
$('#arquivo').live('change',function(){
$('#formUpload').ajaxForm({
uploadProgress: function(event, position, total, percentComplete) {
$('progress').attr('value',percentComplete);
$('#porcentagem').html(percentComplete+'%');
},
success: function(data) {
$('progress').attr('value','100');
$('#porcentagem').html('100%');
if(data.sucesso == true){
$('#resposta').html('<img src="'+ data.msg +'" />');
}
else{
$('#resposta').html(data.msg);
}
},
error : function(){
$('#resposta').html('Erro ao enviar requisição!!!');
},
dataType: 'json',
url: 'enviar_arquivo.php',
resetForm: true
}).submit();
})
})
![]() |
0 |