function workSearch(comune){ loading(true); //prompt("url:","http://mappe.bpms.re.it/maps-cbec/includes/main_work_in_prog.inc.php?Comune=" + comune); //Recupero tramite Ajax lo script JS creato dinamicamente dal server in funzione dei parametri passati var bindArgs = { // // The following URL must match that used to test the server. url: "http://mappe.bpms.re.it/maps-cbec/includes/main_work_in_prog.inc.php?Comune=" + comune, handleAs: "text", // The LOAD function will be called on a successful response. load: function(response, ioArgs) { // //alert(response); if (response) { eval(response); checkView('worksStatus', ''); } loading(false); return response; }, // The ERROR function will be called in an error case. error: function(response, ioArgs) { // alert("Errore durante il recupero delle triangolazioni:\r\n" + "HTTP status code ", ioArgs.xhr.status); // return response; // } }; // dispatch the request dojo.xhrGet(bindArgs); } function shWorksInfo(bool){ if(markersWorks != null){ for(var i = 0; i < markersWorks.length; i++){ if(bool){ markersWorks[i].show(); }else{ markersWorks[i].hide(); } } } if(polygonComuneWorks != null){ if(bool){ polygonComuneWorks.show(); }else{ polygonComuneWorks.hide(); } } }