How can I run a query service in Javascript?
Hi,
I have a REST query servcie named "getUser".
I run it in a javascirpt.like below, I want to get the data where usreID=2,
but the "where" is ignored.It always return a full list of User.
Can anyone help me?
///////////////////////////////////////////
getUser.execute({
where:{userID:"2"},
success:function(data){
alert("success!!!"+data.length);
},
error:function ( jqXHR, textStatus, errorThrown ) {
alert("error!!!");
}
});
///////////////////////////////////////////
this return a full list.
I also try:
///////////////////////////////////////////
getUser.execute({data:{
where:{userID:"2"}},
success:function(data){
alert("success!!!"+data.length);
},
error:function ( jqXHR, textStatus, errorThrown ) {
alert("error!!!");
}
});
///////////////////////////////////////////
This return a "error!!!".