I have to call the web service using java script? e.g. I'm creating one app in HTML. In that I want to check user name and password in server machine(computer) and I want to collect the result from the server. Here I'm passing three arguments like user name, password and login mode(windows or others) then it's sent to server and it returns json result then I parse the json result and then I'm binding in to a list. so I got output in jQuery.
// Make the dataobject based on the credentials
var dataObject = {};
dataObject = {Username:uname,Password:pword,Domain:domain,WindowsUser:windowsuser};
//webservice
$.ajax({
type: "POST",
url:"../REST/session.aspx?_method=put",
data: JSON.stringify(dataObject, null,4),
cache: false,
dataType: "json",
success: onSuccessLogin,
error: function (xhr, ajaxOptions){
alert(xhr.status + " : " + xhr.statusText);
}
});
function onSuccessLogin(data)
{
alert("success");
$.mobile.pageLoading();
//Parse the vault result
parseResults(data);
}
then I successfully parsed. Here I want to change the web service because Non touch mobiles doesn't support the jQuery. so that I'm changing that web service.