below is a simple javascript to tell you how to call web service with parameter
var WebReq = null;
function findZip() {
if (window.XMLHttpRequest)
WebReq = new XMLHttpRequest();
else if (window.ActiveXObject) {
if (new ActiveXObject("Microsoft.XMLHTTP"))
WebReq = new ActiveXObject("Microsoft.XMLHTTP");
else
WebReq = new ActiveXObject("Msxml2.XMLHTTP");
}
var url = "http://xxxxxx/getCityState";
WebReq.open("post", url, true);
WebReq.setRequestHeader("Host","localhost:2508/IVA");
WebReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
WebReq.setRequestHeader("Content-Length","100");
WebReq.onreadystatechange = Result;
}
No comments:
Post a Comment