﻿
var xmlHttp;
function createXmlHttpRequest()
 {
     if(window.ActiveXObject)
     {
      xmlHttp = new ActiveXObject("microsoft.XMLHttp");
     }
  else 
     xmlHttp = new XMLHttpRequest();
 }
 
function weathercallback()
{
    if(xmlHttp.readyState==4)
    {
        if(xmlHttp.status==200)
        {
        document.getElementById('weather').innerHTML= xmlHttp.responseText;
        }
    }
}

function getWeather(obj)
{
    createXmlHttpRequest();
    xmlHttp.open("GET","/web_serverCode/GetWeather.aspx?CityName="+obj);
    xmlHttp.onreadystatechange = weathercallback;
    xmlHttp.send(null);
}
