Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more: , +
I am creating a js function using web service url like below ... what are the flaws ? please tell.

JavaScript
<script type="text/javascript">
      window.onload=  function view() {
          var data = document.getElementById("id1").innerHTML;
         
          $.get("http://order.arrahmanoverseas.com/WebService.asmx?WSDL/increase_clicks", function (response) {
                data = response;
            }).error(function () {
                alert("Sorry could not proceed");
            });

          return data;          
        }
</script>
Posted
Updated 11-Sep-15 23:29pm
v3
Comments
Afzaal Ahmad Zeeshan 12-Sep-15 5:28am    
What do mean flaws? Are there any errors, then share the error message that is shown? Look for it in the console, there it will be logged.
F-ES Sitecore 12-Sep-15 8:31am    
google "call asmx webservice from jquery" to get examples.

http://forums.asp.net/t/1934215.aspx?Using+jQuery+ajax+to+call+asmx+webservice+methods

1 solution

To call webservice from javascript, the ajax call is needed
 
Share this answer
 

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