(function ($) { $.ajax({ type: 'POST', url: "/heraldplugins/call/direct/InformazioniUtente.php", success: function(risultato){ HeraldInfoUtente = jQuery.parseJSON(risultato.replace( /((.|\n)+?){"/gm, "{\"" )); if(HeraldInfoUtente.stato == "loggato") { $.ajax({ type: 'POST', url: "/heraldplugins/call/direct/HeraldTrace.php", data: {u:window.location.href}, success: function(risultato){/*Ok*/}, error: function(jqXHR,textStatus,errorThrown){console.log("Herald Trace: Errore di connessione a Direct: "+textStatus);} }); } else{/*Non loggato.*/} }, error: function(jqXHR,textStatus,errorThrown){console.log("Herald Trace: Impossibile ottenere info utente attuale.");} }); })(jQuery);