Jquery: Return the value of a ajax call to caller function?

后端 未结 4 597
醉酒成梦
醉酒成梦 2021-01-27 15:53

Im trying to return the value that a $ajax call returns, from a function but it only returns \"undefined\". If a alert the \"reponse\" from the ajax call it returns the rigth va

4条回答
  •  再見小時候
    2021-01-27 16:47

    You're doing 2 ajax requests which are identical. To improve performance you should pass an array of IDs to your CandidateName method and then your server-side script also should return an array of matched names.

提交回复
热议问题