<script type="text/javascript" language="javascript">
function GetCustomerByPOX()
{
var dataText = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
dataText += "<GetCustomer><ID>" + frmCustomerPost1.ID.value + "</ID>";
dataText += "</GetCustomer>";
alert(dataText);
urlToPost = "http://vishwa/exampleservice/customerservice.svc/pox/GetCustomerByPOX"
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", urlToPost,false);
xmlHttp.setRequestHeader("Content-Type", "text/xml");
xmlHttp.send(dataText);
alert(xmlHttp.responseText);
}
function AddCustomerByPOX()
{
var dataText = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
dataText += "<AddCustomer><CustomerRecord>";
dataText += "<ID>" + frmCustomerPost1.ID.value + "</ID>";
dataText += "<Name>" + frmCustomerPost1.Name.value + "</Name>";
dataText += "<DOB>" + frmCustomerPost1.DOB.value + "</DOB>";
dataText += "<Address>" + frmCustomerPost1.Address.value + "</Address>";
dataText += "</CustomerRecord></AddCustomer>";
alert(dataText);
urlToPost = "http://vishwa/exampleservice/customerservice.svc/pox/AddCustomerByPOX"
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", urlToPost,false);
xmlHttp.setRequestHeader("Content-Type", "text/xml");
xmlHttp.send(dataText);
alert(xmlHttp.responseText);
}
function UpdateCustomerByPOX()
{
var dataText = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
dataText += "<UpdateCustomer><CustomerRecord>";
dataText += "<ID>" + frmCustomerPost1.ID.value + "</ID>";
dataText += "<Name>" + frmCustomerPost1.Name.value + "</Name>";
dataText += "<DOB>" + frmCustomerPost1.DOB.value + "</DOB>";
dataText += "<Address>" + frmCustomerPost1.Address.value + "</Address>";
dataText += "</CustomerRecord></UpdateCustomer>";
alert(dataText);
urlToPost = "http://vishwa/exampleservice/customerservice.svc/pox/UpdateCustomerByPOX"
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", urlToPost,false);
xmlHttp.setRequestHeader("Content-Type", "text/xml");
xmlHttp.send(dataText);
alert(xmlHttp.responseText);
}
function DeleteCustomerByPOX()
{
var dataText = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
dataText += "<DeleteCustomer><ID>" + frmCustomerPost1.ID.value + "</ID>";
dataText += "</DeleteCustomer>";
alert(dataText);
urlToPost = "http://vishwa/exampleservice/customerservice.svc/pox/DeleteCustomerByPOX"
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", urlToPost,false);
xmlHttp.setRequestHeader("Content-Type", "text/xml");
xmlHttp.send(dataText);
alert(xmlHttp.responseText);
}
function GetCustomersByPOX()
{
urlToPost = "http://vishwa/exampleservice/customerservice.svc/pox/GetCustomersByPOX"
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", urlToPost,false);
xmlHttp.setRequestHeader("Content-Type", "text/xml");
xmlHttp.send(null);
alert(xmlHttp.responseText);
}
</script>