Code

<div id="forecast" style="max-width:250px; overflow:auto">

</div>



<script>

var tab_mois=new Array("Jan.", "Fév.", "Mars", "Avr.", "Mai", "Juin", "Juil.", "Août", "Sep.", "Oct.", "Nov.", "Déc.");

var tab_jour=new Array("Dim.", "Lun.", "Mar.", "Mer.", "Jeu.", "Ven.", "Sam.");


var proccessResults2 = function() {

    console.log(this);

    var results = JSON.parse(this.responseText);

    var t_date;

    if (results.list.length > 0) {

      var forecast_text = 'Ville:<strong>'+results.city.name+'</strong>';

      forecast_text += '<table bgcolor="#E0F8F7"><tr>';

      for (var i = 0; i < results.list.length; i++) {

       var Date_f = new Date(results.list[i].dt*1000);

       Date_d = Date_f.getDay();

       Date_n = Date_f.getDate();

       Date_m = Date_f.getMonth();

       forecast_text += "<td style= 'border-right: 1px solid white; border-bottom: 1px solid white;'><center>"+tab_jour[Date_d]+"<br>"+Date_n+"<br>"+tab_mois[Date_m]+"</td></center>";

        } // fin du for

      forecast_text += '</tr><tr>';

      for (var i = 0; i < results.list.length ; i++) {

       forecast_text += "<td style= 'border-right: 1px solid white;'><center>";

       forecast_text += "<img src=" + "http://openweathermap.org/img/w/"+ results.list[i].weather[0].icon  + ".png";

       forecast_text += " title=\""+results.list[i].weather[0].description+"\" ><br>";

       forecast_text += Math.round(results.list[i].temp.day) + "&deg;C</center></td>";

        } // fin du for

       forecast_text +='</tr></table>';

//       document.write(forecast_text);

       var div = document.getElementById("forecast");

       div.innerHTML = forecast_text;

    } // fin du if


 

  }; // fin fonction




function Appel(City) {

    var requestString2 ="http://api.openweathermap.org/data/2.5/forecast/daily?id="+City+"&cnt=15&units=metric&lang=fr&APPID=xxxxxxxxxxx";

    request = new XMLHttpRequest();

    request.onload = proccessResults2;

    request.open("get", requestString2, false);

    request.send();

}


function Appel_id() {

  d = document.getElementById("liste").value;

//  document.write(d);

  Appel(d);


}

Appel ("2985034");


</script>


<select  id="liste" onchange="return Appel_id()">

 <option value="3037044">Argenteuil (95)</option>

 <option value="3023763">Corbeil-Essonnes (91)</option>

 <option value="3019459">Etampes (91)</option>

 <option value="2996148">Mantes-la-Jolie (78)</option>

 <option value="2994798">Meaux (77)</option>

 <option value="2994651">Melun (77)</option>

 <option value="2992090">Montreuil (93)</option>

 <option value="2988507">Paris (75)</option>

 <option value="2985034" selected="selected">Puteaux (92)</option>

 <option value="3421319">Nuuk (Groenland)</option>

 <option value="2984513">Rambouillet(78)</option>

 <option value="3413829">Rekjavik (Islande)</option>

 <option value="2967849">Vitry-sur-Seine (94)</option>

</select>