﻿
//城市------------------------------
function cityResult()
{ 
	var city=document.getElementById("DropDownList1");
	AjaxMethod.GetCityList(city.value,get_city_Result_CallBack);
}

function get_city_Result_CallBack(response)
{
	if (response.value != null)
	{					
		//debugger;
		document.all("DropDownList2").length=0;
　　　　var ds = response.value;
		if(ds != null && typeof(ds) == "object" && ds.Tables != null)
		{					
			for(var i=0; i<ds.Tables[0].Rows.length; i++)
　　　　	{
　　　　		var name=ds.Tables[0].Rows[i].city;
　　　　　　	var id=ds.Tables[0].Rows[i].cityID;
　　　　　　	document.all("DropDownList2").options.add(new Option(name,id));
　　　　	}
		}
	}				
	return
}
//市区----------------------------------------
function areaResult() 
{ 
	var area=document.getElementById("DropDownList2");
	AjaxMethod.GetAreaList(area.value,get_area_Result_CallBack);
}
function get_area_Result_CallBack(response)
{
	if (response.value != null)
	{					
		document.all("DropDownList3").length=0;　　　　			
　　　　var ds = response.value;
		if(ds != null && typeof(ds) == "object" && ds.Tables != null)
		{					
			for(var i=0; i<ds.Tables[0].Rows.length; i++)
　　　　	{
　　　　　　	var name=ds.Tables[0].Rows[i].area;
　　　　　　	var id=ds.Tables[0].Rows[i].areaID;
　　　　　　	document.all("DropDownList3").options.add(new Option(name,id));
　　　　	}				
		}
	}
	return
}