﻿// JScript 文件
function cityResult()
{			   
    var city=document.getElementById("ctl00_ContentPlaceHolder1_city");
    getcity.Getarea(city.value,get_city_Result_CallBack);
}		

function get_city_Result_CallBack(response)
{
    if(response.value!=null)
    {
      var area_v=document.getElementById("ctl00_ContentPlaceHolder1_area");
      area_v.options.length=0;        
      
      var ds=response.value;
      if(ds!=null && typeof(ds)=="object" && ds.Tables!=null)
      {
         area_v.options.add(new Option("- 地區 -",""));
         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].area;
            area_v.options.add(new Option(name,id));
         }
      }
    }
}
