0

I'm trying to access web service that written in .net. But I identified there is a problem with my javascript code. But I can't identify what it is. Any body plz help me...

This is my JS code

 function getID() {
        var id = document.getElementById("Text1").value;
        WebApplication4.myWebService1.getDetails(id, getSMSSucsess); // The problem I think..
      }

function getSMSSucsess(result) {
        document.getElementById("myDev").value = result["status"];
      }
user3241954
  • 1
  • 1
  • 1

1 Answers1

1

You can't call server side code from javascript, one lives on the server the other on the client.

The line

WebApplication4.myWebService1.getDetails(id, getSMSSucsess);

does not exist in javascript.

I would suggest making a jQuery ajax call to the WebService.

Liath
  • 9,913
  • 9
  • 51
  • 81