I am trying to call a web service through a javascript on an asp page.
I have downloaded webservice.htc from Microsoft. I have an ASPX page
that works with the code I have. when I try the same javascript on an
ASP page I am getting the error:
Object doesn't support this property or method
Here is the code
function FillRestrictedStates()
{
var TargetMethod = "GetStates"
//var TargetMethod = "DailyDilbertImage"
//init and create short-cut name for web service
//***************error on the following line
*****************************
MyWebService.useService("http://xxx.com/aws.asmx?
WSDL",TargetMethod);
var iCallID;
if (MyWebService.GetStates("ddd"))
{
document.getElementById("lblDateTime").innerHTML="Loadin...";
iCallID=
MyWebService.GetStates.callService(ReturnResult,TargetMethod);
}
}
<body ondblclick="FillStates();" onload="FillStates();">
<DIV id="MyWebService" style="BEHAVIOR: url(webservice.htc)"></DIV>
<form id="frmWebSvcDateTime" method="post" runat="server">