Intanto grazie per la risposta
Ho inserito uno script sincrono
l'alert scatta dopo, ma mi ritorna undefined
<code>
function call_ajax(){
$.ajax({
type: "POST",
url: "/include/ajaxTempoDistanza.asp",
dataType: "html",
data: "origine=43.608896,3.880175&destintario=43.60736,3 .8939890000000332&stampa=no",
async: false,
cache: false,
timeout:30000,
success: function(html){
alert("html " + html);
return html
}
});
}
sp=call_ajax()
alert(" sp " + sp)
</code>
oltre a questo messaggio nella console javascript
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
onestamente non so fare la chiamata in callback, provo a cercare qualcosa, o se mi puoi dare una dritta
Grazie