Autocomplete Json from url Please help

Autocomplete Json from url Please help

hy, guys i have a problem i am trying to get autocomplet to show relevant information from an URL and i dont know how ... please help me. 

here is the code ... Any info that could help me is important thank you very much

  1. <!doctype html>
  2.  
  3. <html lang="en">
  4. <head>
  5. <meta charset="utf-8" />
  6. <title>Autocomplet</title>
  7. <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" />
  8. <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  9. <script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
  10. <link rel="stylesheet" href="/resources/demos/style.css" />
  11. <script type="text/javascript">
  12. $(function() {
  13. $("#hotel").autocomplete({
  14. source: function(request, response){
  15. $.ajax ({
  16. url: "https://tsbo-bbh.develop.inexweb.de/cms/rest/portal/search/autocomplete?input=?",
  17. dataType:"jsonp",
  18. data: {
  19. featureClass:"P",
  20. style:"full",
  21. maxRows:9,
  22. name_startsWith: request.term
  23. },
  24. success: function (data){
  25. response($.map(data.hotels, function(item){
  26. return {
  27. label: item.hotels,
  28. value: item.hotels
  29. }
  30. }));
  31. }
  32. });
  33. },
  34. minLength: 2,
  35. });
  36. });
  37. </script>
  38. </head>
  39. <body>
  40.  
  41. <div class="ui-widget">
  42.   <label for="hotel">hotel: </label><input id="hotel" /></div>
  43.  
  44. <div class="ui-widget" style="margin-top: 2em; font-family: Arial;">Result:<div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
  45. </div>
  46. </body>
  47. </html>