Hi,
select:
This is an event which gets called when one select an item from the drop list.
$(this).val(ui.item.label);
is assigning the value of the selected label the textbox.
The line
__doPostBack($("input[id*=btn]").attr("id"), "OnClick")
is used to fire some server side event of the button with id
btn.
source:
This is the event to associate data source to the auto complete. In this case dataArray should be something like-
<script type="text/javascript">
var dataArray=[{"value":"1","label":"abc"},{"value":"1","label":"abc"},{"value":"2","label":"acbc"},{"value":"3","label":"abcfd"},{"value":"4","label":"assbc"},{"value":"5","label":"aaabc"},{"value":"6","label":"ddabc"},{"value":"7","label":"dggabc"},{"value":"8","label":"dabc"},{"value":"9","label":"vvabc"},{"value":"10","label":"vabc"},{"value":"11","label":"vgafftbc"},{"value":"12","label":"vabc"},{"value":"13","label":"vddabc"}]
</script>
Each time there is any change in the text box, it call the corresponding function. This function takes response as a second parameter which is nothing but a function which accept array of label value. And in this case jQuery
map[
^] is used to filter the matching value.
For reference check
this[
^] post.