日期:2014-05-16 浏览次数:20303 次
/* *tenpo tag */ function getTenpo(){ $("#area").FillOptions("/syspro/ajax/ajaxGetArea.action",{datatype:"json",textfield:"name",valuefiled:"id"}); if($.browser.msie && selected) { $('option[value='+selected+']',this).attr('selected',true); } if($("#areaValue").val()==""||$("#areaValue").val()==null||$("#areaValue").val()=="null"){ $("#area").AddOption("","-1",true,0); }else{ $("#area").AddOption("","-1",false,0); $("#area").val($("#areaValue").val()); $("#district").FillOptions("/syspro/ajax/ajaxGetDistrict.action?area="+$("#areaValue").val(),{datatype:"json",textfield:"name",valuefiled:"id"}); if($("#districtValue").val()==""||$("#districtValue").val()==null||$("#districtValue").val()=="null"){ $("#district").AddOption("","-1",true,0); }else{ $("#district").AddOption("","-1",false,0); $("#district").val($("#districtValue").val()); $("#tenpo").FillOptions("/syspro/ajax/ajaxGetTenpo.action?district="+$("#districtValue").val(),{datatype:"json",textfield:"name",valuefiled:"id"}); if($("#tenpoValue").val()==""||$("#tenpoValue").val()==null||$("#tenpoValue").val()=="null"){ $("#tenpo").AddOption("","-1",true,0); }else{ $("#tenpo").AddOption("","-1",false,0); $("#tenpo").val($("#tenpoValue").val()); } } } $("#area").CascadingSelect( $("#district"), "/syspro/ajax/ajaxGetDistrict.action", {datatype:"json",textfield:"name",valuefiled:"id",parameter:"area"}, function(){ $("#district").AddOption("","-1",true,0); $("#tenpo").html(""); $("#tenpo").AddOption("","-1",true,0); } ); $("#district").CascadingSelect( $("#tenpo"), "/syspro/ajax/ajaxGetTenpo.action", {datatype:"json",textfield:"name",valuefiled:"id",parameter:"district"}, function(){ $("#tenpo").AddOption("","-1",true,0); } ); } /** *city tag */ function getCity(){ $("#adArea").FillOptions("/syspro/ajax/ajaxGetAdArea.action",{datatype:"json",textfield:"name",valuefiled:"id"}); if($.browser.msie && selected) { $('option[value='+selected+']',this).attr('selected',true); } if($("#adAreaValue").val()==""||$("#adAreaValue").val()==null||$("#adAreaValue").val()=="null"){ $("#adArea").AddOption("","-1",true,0); }else{ $("#adArea").AddOption("","-1",false,0); $("#adArea").val($("#adAreaValue").val()); $("#prefecture").FillOptions("/syspro/ajax/ajaxGetPrefecture.action?adArea="+$("#adAreaValue").val(),{datatype:"json",textfield:"name",valuefiled:"id"}); if($("#prefectureValue").val()==""||$("#prefectureValue").val()==null||$("#prefectureValue").val()=="null"){ $("#prefecture").AddOption("","-1",true,0); }else{ $("#prefecture").AddOption("","-1",false,0); $("#prefecture").val($("#prefectureValue").val()); $("#city").FillOptions("/syspro/ajax/ajaxGetCity.action?prefecture="+$("#prefectureValue").val(),{datatype:"json",textfield:"name",valuefiled:"id"}); if($("#cityValue").val()==""||$("#cityValue").val()==null||$("#cityValue").val()=="null"){ $("#city").AddOption("","-1",true,0); }else{ $("#city").AddOption("","-1",false,0); $("#city").val($("#cityValue").val()); } } } $("#adArea").CascadingSelect( $("#prefecture"), "/syspro/ajax/ajaxGetPrefecture.action", {datatype:"json",textfield:"name",valuefiled:"id",parameter:"adArea"}, function(){ $("#prefecture").AddOption("","-1",true,0); $("#city").html(""); $("#city").AddOption("","-1",true,0); } ); $("#prefecture").CascadingSelect( $("#city"), "/syspro/ajax/ajaxGetCity.action", {datatype:"json",textfield:"name",valuefiled:"id",parameter:"prefecture"}, function(){ $("#city").AddOption("","-1",true,0); } ); } /** *Json common */ function JsonResult(url,options){ if(url.length == 0) throw "request is required"; var strJosn = eval(options); var params = ""; if(strJosn!=undefined){ for(var i=0; i<strJosn.length; i++){ var id = strJosn[i].id; var