Even though it returns 200, are you sure it's the correct format as
specified in your dataType (json)?
You should put an error callback in your ajax option. That might
trigger and help solve your issue.
You should also use Firebug for Firefox to help troubleshoot ajax
issues.

On Feb 20, 4:57 am, Mike <mal...@gmail.com> wrote:
> > 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?

Reply via email to