Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.lang.javascript > #7938

intercettare "error" su chiamata ajax.

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail
From Meldro <Meldro@nospam.no>
Newsgroups it.comp.lang.javascript
Subject intercettare "error" su chiamata ajax.
Date Wed, 25 Nov 2015 16:15:57 +0100
Organization Aioe.org NNTP Server
Lines 26
Message-ID <n34jbl$tmr$1@speranza.aioe.org> (permalink)
NNTP-Posting-Host D9uohGUdBNVreShb4Jf+Kw.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-15; format=flowed
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
X-Notice Filtered by postfilter v. 0.8.2
X-Mozilla-News-Host news://nntp.aioe.org:119
Xref csiph.com it.comp.lang.javascript:7938

Show key headers only | View raw


Salve a tutti,
ho del codice JS che esegue una chiamata ajax in questi termini:

  $.ajax({
                 url: "calcolo.php",
                 type: "POST",
                 data: dataString,
                 dataType: "json",
                 success: function(output) {
                     elabora(output);
                 },
                 error: function() {
                     alert("Chiamata fallita, si prega di riprovare...");
                 }
             });

La chiamata sistematicamente mi va in error e restituisce l'alert specifico.

Vorrei capire PERCHE' mi va in error e non in success, visto che quello 
che esce dal file calcolo.php รจ comunque in JSON formalmente valido.

Non dovrebbe uscire in success?

Come posso capire cosa non va?

Grazie in anticipo.

Back to it.comp.lang.javascript | Previous | NextNext in thread | Find similar


Thread

intercettare "error" su chiamata ajax. Meldro <Meldro@nospam.no> - 2015-11-25 16:15 +0100
  Re: intercettare "error" su chiamata ajax. Alessandro Pellizzari <shuriken@amiran.it> - 2015-11-25 19:53 +0000
  Re: intercettare "error" su chiamata ajax. 4ndre4 <a.laforgia@gmail.com> - 2015-11-26 05:13 -0800

csiph-web