Referencing the query object in JS query
I made a text field and a button, and on the button click event I run JS
pre
getQuestions.execute({data:{where: '{"_id":"53620e12e4b058d902d3f58b"}',
success:function(data){
alert("success! "+data);
},
error:function ( jqXHR, textStatus, errorThrown ) {
alert("error!");
}
}});
/pre
The getQuestions query is mapped to the text field
When I click the button I get pop up "Success!undefined" then pop up "error!" then the query result is placed into the text box as expected.
How do I reference the returned query object in JS?