//以下部分为通过AJAX读取商品信息
var req;

function Change_Select()
{
    var useTypeID=document.getElementById("msgtype1").value;
 var flowerTypeID=document.getElementById("msgtype2").value;
 var flowerPriceID=document.getElementById("msgtype3").value;
 var url="/12580/jsp/ShowProductServlet?msgtype1="+ useTypeID +"&msgtype2="+flowerTypeID+"&msgtype3="+flowerPriceID;
     if(window.XMLHttpRequest)
        {
            req=new XMLHttpRequest();
        }else if(window.ActiveXObject)
        {
            req=new ActiveXObject("Microsoft.XMLHTTP");
        }
       
        if(req)
        {
            req.open("GET",url,true);
            req.onreadystatechange = callback;
            req.send(null);
        }
}

function callback()
{
    if(req.readyState == 4)
    {
        if(req.status == 200)
        {
           var dataTableBody=document.getElementById("tbProduct");
           dataTableBody.innerHTML=req.responseText;
        }else{
            alert("Not able to retrieve description:"+req.statusText);
        }
    }
}

 


//--------------------------------------------
//以下部分为通过AJAX动态显示小窗口内容

function distChange(htmlStr){
 distHelp.innerHTML = htmlStr;
}

var req1;

function Change_Select1()

    var cityID=document.getElementById("stage2").value.substr(0,document.getElementById("stage2").value.indexOf("/"));
 var url="/12580/jsp/SelectCityChangeServlet?isFront=1&id="+cityID;
     if(window.XMLHttpRequest)
        {
            req1=new XMLHttpRequest();
        }else if(window.ActiveXObject)
        {
            req1=new ActiveXObject("Microsoft.XMLHTTP");
        }
       
        if(req1)
        {
            req1.open("GET",url,true);
            req1.onreadystatechange = callback1;
            req1.send(null);
        }
}

function callback1()
{
    if(req1.readyState == 4)
    {
        if(req1.status == 200)
        {
           var dataTableBody=document.getElementById("distHelp");
           dataTableBody.innerHTML=req1.responseText;
        }else{
            alert("Not able to retrieve description:"+req1.statusText);
        }
    }
}