﻿
function consultaTiempo(){$.ajax({url:"proxyMeteo.php",success:function(datosDevueltos){document.getElementById("meteo_contenedora").style.display="block";codigoTiempo=datosDevueltos.getElementsByTagName('icono_ceo')[0].attributes[0].firstChild.data;switch(codigoTiempo){case"101":document.getElementById("ico101").style.display="block";document.getElementById("meteo_eltiempo").innerHTML=document.getElementById("meteo_eltiempo").innerHTML+" "+"<b>Soleado</b>";break;case"102":document.getElementById("ico102").style.display="block";document.getElementById("meteo_eltiempo").innerHTML=document.getElementById("meteo_eltiempo").innerHTML+" "+"<b>Nubes y claros</b>";break;case"103":document.getElementById("ico103").style.display="block";document.getElementById("meteo_eltiempo").innerHTML=document.getElementById("meteo_eltiempo").innerHTML+" "+"<b>Cubierto</b>";break;case"104":document.getElementById("ico104").style.display="block";document.getElementById("meteo_eltiempo").innerHTML=document.getElementById("meteo_eltiempo").innerHTML+" "+"<b>Chubascos</b>";break;case"105":document.getElementById("ico105").style.display="block";document.getElementById("meteo_eltiempo").innerHTML=document.getElementById("meteo_eltiempo").innerHTML+" "+"<b>Lluvioso</b>";break;case"106":document.getElementById("ico106").style.display="block";document.getElementById("meteo_eltiempo").innerHTML=document.getElementById("meteo_eltiempo").innerHTML+" "+"<b>Despejado</b>";break;case"107":document.getElementByClassName("ico107").style.display="block";document.getElementById("meteo_eltiempo").innerHTML=document.getElementById("meteo_eltiempo").innerHTML+" "+"<b>Lluvioso</b>";break;}document.getElementById("meteo_temperatura").innerHTML=datosDevueltos.getElementsByTagName('temperatura')[0].attributes[0].firstChild.data+"º";},error:function(xhr,ajaxOptions,thrownError){alert(xhr.responseText+" "+ajaxOptions+" "+thrownError);}})}
