xmlHttp.onreadystatechange=function(){ if(xmlHttp.readyState!=4)return; alert((xmlHttp.status!=200)?'нет соединения':xmlHttp.responseText); }