|
function load ()
{
var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); // Create XMLHTTPRequest object, need MSXML4.0 support
xmlhttp.open ("POST", "../../ AddressBehind.aspx", false, "", ""); // Initiate HTTP request using HTTP GET
xmlhttp.setRequestHeader ("Content-Type", "application / x-www-form-urlencoded");
xmlhttp.send ("name = ddlPro&id = 1"); // Send HTTP request and get HTTP response
var res = xmlhttp.responseText.split ("| *");
var name = res [0] .split ("|");
var id = res [1] .split ("|");
document.all.ddlPro.options [0] = new Option ("Please select", 0);
document.all.ddlCity.options [0] = new Option ("Please select", 0);
document.all.ddlReg.options [0] = new Option ("Please select", 0);
for (i = 0; i <name.length; i ++)
{
document.all.ddlPro.options [i + 1] = new Option (name [i], id [i]);
}
xmlhttp.open ("POST", "../../ Sort.aspx", false, "", ""); // Initiate HTTP request using HTTP GET
xmlhttp.setRequestHeader ("Content-Type", "application / x-www-form-urlencoded");
xmlhttp.send (); // Send HTTP request and get HTTP response
var res = xmlhttp.responseText.split ("|");
document.getElementById ("dish"). innerHTML = res [1];
var dishImage = document.getElementById ("dishImage");
dishImage.src = "../../ image /" + res [0];
xmlhttp.open ("POST", "../../ RestSort.aspx", false, "", ""); // Initiate HTTP request using HTTP GET
xmlhttp.setRequestHeader ("Content-Type", "application / x-www-form-urlencoded");
xmlhttp.send (); // Send HTTP request and get HTTP response
res = xmlhttp.responseText.split ("|");
document.getElementById ("rest"). innerHTML = res [1];
var restImage = document.getElementById ("restImage");
restImage.src = "../../ image /" + res [0];
} |
|