Click here to Skip to main content
15,891,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to call webservice from html. I tried this code but it is not working in Mozilla,crome. this code is working good in IE. Can any one tell me where is the issue. Thanks in advance.
XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="jquery-1.4.1.js" type="text/javascript"></script>
     <script language="JavaScript">

      var iCallID;
            function InitializeService()
            {
                service.useService("http://www.webservicex.net/CurrencyConvertor.asmx?WSDL",  "ConversionRate");
                service.ConversionRateService.callService("ConversionRate", "AFA", "INR");
            }

            function ShowResult()
            {
               alert(event.result.value);
            }


    </script>
</head>
<body onload="InitializeService()"  id="service" style="behavior:url(webservice.htc)"  onresult="ShowResult()">
    <button onclick="GetAge()">Get Age</button><br />
</body>
</html>
Posted
Comments
ZurdoDev 6-Sep-12 9:18am    
I would use jQuery's ajax call, http://api.jquery.com/jQuery.ajax/ That is my preference.
fjdiewornncalwe 6-Sep-12 9:56am    
I'd +5 that as an answer. You should move it there.
Nueman 6-Sep-12 10:34am    
Agreed. I second Kramer's suggestion.

I would use jQuery's .ajax call, http://api.jquery.com/jQuery.ajax/[^] That is my preference.
 
Share this answer
 
Thanks i solved it by creating js file. i created the js file which is on my server and call the function of these js file in HTML page...
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900