Hello,
First of all to point out that I m begginer with javascript and web services. Some days now i try to make out how does $.ajax works but I face some problems... I have get a lot of help till now from forums but still i have some questions...
I have include lib Json2.js
and i use IE 7
Here is my code
var objuser ={"companycode": "test1"," usercode": "test2","applicationname":"test3"};
$.ajax(
{
type: "POST",
url: "localhost:51136/Service2.wsdl/FindByUserAndApplication",
contentType: "application/json; charset=utf-8",
data:JSON.stringify(objuser),
//data: objuser, i tried this also but i got the same error
datatype: "json",
success: function (msg) {
alert(msg);
},
error: function(req, status, error) {
alert(req + ", " + status + ", " + error);
} ,
complete: function(req, status) {
alert(req + ", " + status);
}
});
as response i get the a web page message : "NaN [Object error]"
Do you have any idea what this means??? Or how to fix it???
I tried also to call a more simple service which displays just a "Hello world"
but i got the same error again.
I have searched a lot but I cannot figure out what I do wrong...
Thank you a lot in advance
Maria