> I have this code: > > $("#loading") > .ajaxStart(function() > { > $(this).show(); > }) > .ajaxComplete(function() > { > $(this).hide(); > }); > var options = > { > beforeSubmit: showRequest, > success: showResponse, > url: '/library/scripts/upload.php', > clearForm: true, > dataType: 'json' > }; > $('#ajax_form').submit(function() > { > $(this).ajaxSubmit(options); > return false; > }); > > function showRequest(formData, jqForm, options) > { > var fileToUploadValue = $('#upFileInput').val(); > if (fileToUploadValue == "") > { > alert('Пожалуйста, выберите файл для загрузки.'); > return false; > } > return true; > > } > > function showResponse(data, statusText) > { > alert(data); > cropScreen(); > $('#cropPhoto').html(data); > > } > > upload.php output is: <img src="imgpath"> > > But success event won't trigger at all, I've checked and rechecked > all, but can't find the problem source. Apache logs says that > upload.php was called and completed with code 200 (success). > > Sadly I cannot give link to see it, cause it's on our internal server > and I'm forbidden to put it on any ext server.
I don't see anything obvious from what you posted. What does the form markup look like?