Advertisement
Guest User

Untitled

a guest
Jul 1st, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. if (item.id == 0)
  2. {
  3. return {
  4. label: "Location Not Found",
  5. value: item.id
  6. }
  7. }
  8. else
  9. {
  10. return {
  11. label: item.location_name,
  12. value: item.id
  13. }
  14. }
  15.  
  16. }));
  17. }
  18. });
  19. },
  20. select: function(event, ui) {
  21. $(".search_box").val(ui.item.label);
  22. $("#location_id").val(ui.item.value);
  23. $(".search_box").blur();
  24. _self.autocomplete("close");
  25. return false;
  26. },
  27. focus: function(event, ui) {
  28. return false;
  29. }
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement