asp.net - How to Execute Javascript in documentdb -


how execute js file in client.executestoredprocedureasync(); not send result

function simple(useid) {   var collection = getcontext().getcollection();     var isaccepted = collection.querydocuments(     collection.getselflink(),     "select * c c.id='" + useid +"'"); } 

you want set stored procedure response in callback querydocuments().

for example:

function simple(useid) {     var collection = getcontext().getcollection();       var isaccepted = collection.querydocuments(         collection.getselflink(),         "select * c c.id='" + useid + "'",         {},         function(err, documents, responseoptions) {             getcontext().getresponse().setbody(documents);         }); } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -