I am using jquery ajax when clicking on a link but i want to pass a usedefined function name from that link so that when i get results from ajax it should callback to the function i have passed . i am using this
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript">
var call_me = function(data){
alert(data);
};
var getmsg = function (val,callback) {
// alert(val+call_me);
$.ajax({
url : "send.php",
type : "post",
data : {value:val},
success : callback
})
}
</script>
<a href="#" onclick="getmsg($(this).html(),'call_me');">wewewe</a>