function onC()
{
if (req.readyState == 4) {
if (req.status == 200) {
rC(req.responseText);
} else {
alert('该请求有错误!');
}
}
}
function rC(x)
{
var doc = req.responseXML;
doc.loadXML(x);
var a = doc.getElementsByTagName("city");
for(var i= 0;i<a.length;i++)
{
document.all("ctl_loaded_ddlCity").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[0].text));
//document.all("SearchCZInfo1_ddlCity").options.add(new Option("a","a"));
}
}
function onZ()
{
if (req.readyState == 4) {
if (req.status == 200) {
rZ(req.responseText);
} else {
alert('该请求有错误!');
}
}
}
function rZ(x)
{
var doc = req.responseXML;
doc.loadXML(x);
var a = doc.getElementsByTagName("zone");
for(var i= 0;i<a.length;i++)
{
document.all("ctl_loaded_ddlZone").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[0].text));
}
}
function onI()
{
if (req.readyState == 4) {
if (req.status == 200) {
rI(req.responseText);
} else {
alert('该请求有错误!');
}
}
}
function rI(x)
{
var doc = req.responseXML;
doc.loadXML(x);
var a = doc.getElementsByTagName("images");
for(var i= 0;i<a.length;i++)
{
document.all("ctl_loaded_ddlPosition").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[1].text));
document.all("ctl_loaded_ddlFrame").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[1].text));
document.all("ctl_loaded_ddlPic1").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[1].text));
document.all("ctl_loaded_ddlPic2").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[1].text));
document.all("ctl_loaded_ddlPic3").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[1].text));
document.all("ctl_loaded_ddlPic4").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[1].text));
document.all("ctl_loaded_ddlPic5").options.add(new Option(a.item(i).childNodes[0].text,a.item(i).childNodes[1].text));
document.all("imgPosition").style.display="none";
document.all("imgFrame").style.display="none";
document.all("imgPic1").style.display="none";
document.all("imgPic2").style.display="none";
document.all("imgPic3").style.display="none";
document.all("imgPic4").style.display="none";
document.all("imgPic5").style.display="none";
}
alert("图片载入成功!");
}
function z()
{
document.all("ctl_loaded_zone").value=document.Form1.ctl_loaded_ddlZone.selectedIndex;
}
</script>
5、在提交时:
cmd.Parameters.Add("@province_id",SqlDbType.TinyInt).Value=((System.Web.UI.HtmlControls.HtmlInputHidden)this.FindControl("province")).Value;
cmd.Parameters.Add("@city_id",SqlDbType.TinyInt).Value=((System.Web.UI.HtmlControls.HtmlInputHidden)this.FindControl("city")).Value;
cmd.Parameters.Add("@zone_id",SqlDbType.TinyInt).Value=((System.Web.UI.HtmlControls.HtmlInputHidden)this.FindControl("zone")).Value;