|
@@ -63,8 +63,13 @@ request.onreadystatechange = function(){ //обработчик изменени
|
|
|
return;
|
|
|
}
|
|
|
if (weatherRequest.status == 200){
|
|
|
- weatherObj=JSON.parse(weatherRequest.responseText);
|
|
|
var div=document.getElementById("weather");
|
|
|
+ if(city.value=="-Выберете город-"||country.value=="-Выберете страну-"){
|
|
|
+ div.innerHTML="";
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ div.innerHTML="";
|
|
|
+ weatherObj=JSON.parse(weatherRequest.responseText);
|
|
|
var divs=[];
|
|
|
var j=0;
|
|
|
for(var i=0;i<weatherObj.query.results.channel.item.forecast.length;i++){
|