First of all to point out that I'm new with javascript and web services and i try to find out what is really going on some days now... I have got a lot of help from the related topics but I still have some questions...
in my test case i try to pass the values of var objuser. i found many examples like this but for me doesn't work.
I'm working with IE7
I get the error "Micros开发者_运维技巧oft JScript runtime error: JSON.stringify"
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);
}
});
I have allready add the json.js ,json2.js libraries
Thank you in advance for your help!
精彩评论