Hi
I am trying to call my BMI webservice to a html page which calculates and return the result, I have the following code but it is not working.
<html>
<head>
<title>Body Mass Calculator</title>
<script language="JavaScript">
function InitializeService(){
service.useService(http://localhost:57955/BMI.asmx,
"BMI");
}
var doubleFeet, doubleInches, doubleWeight;
function GetBMI(){
doubleFeet = document.DemoForm.doubleFeet.value;
doubleInches = document.DemoForm.doubleInches.value;
doubleWeight = document.DemoForm.doubleWeight.value;
service.BMI.callService("GetBMI", doubleFeet, doubleInches, doubleWeight);
}
function ShowResult(){
alert(event.result.value);
}
</script>
</head>
<body onload="InitializeService()" id="service"
style="behavior:url(webservice.htc)" onresult="ShowResult()">
<form name="DemoForm">
Feet : <input type="text" name="doubleFeet"/>
Inches : <input type="text" name="doubleInches"/>
Weight : <input type="text" name="doubleWeight"/>
<button onclick="GetBMI()">Get BMI</button>
</form>
</body>
</html>