// JavaScript Document function channelSearch(comune, canale) { loading(true); if(comune == 'none'){ var sel = document.getElementById('chComune'); sel.options[0].selected = true; } if(canale == 'none'){ var sel = document.getElementById('chCanale'); sel.options[0].selected = true; } //prompt("url:","http://mappe.bpms.re.it/maps-cbec/includes/main_channel.inc.php?Comune=" + comune + "&Canale=" + canale); //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_channel.inc.php?Comune=" + ((comune)? comune: "none") + "&Canale=" + ((canale)? canale: "none"), handleAs: "text", // The LOAD function will be called on a successful response. load: function(response, ioArgs) { // if (response) { eval(response); checkView('channelStatus', ''); } 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 shChannelInfo(bool){ if(pointsCanaleContainer != null){ for(var i = 0; i < pointsCanaleContainer.length; i++){ if(bool){ pointsCanaleContainer[i].show(); }else{ pointsCanaleContainer[i].hide(); } } } if(markersCanaleContainer != null){ for(var i = 0; i < markersCanaleContainer.length; i++){ if(bool){ markersCanaleContainer[i].show(); }else{ markersCanaleContainer[i].hide(); } } } if(geoXmlChannel != null){ if(bool){ geoXmlChannel.show(); }else{ geoXmlChannel.hide(); } } if(polygonComune != null){ if(bool){ polygonComune.show(); }else{ polygonComune.hide(); } } }