0

Can anyone please tell me how can I do .net MVC web API integrate with PHP web application use jQuery auto complete and display Suburb Name.

I have already added jQuery code to this test url naturalbluesapphires.com/tlc/ver4/auto9.php and when I type post code 3073 if I check in Fiddler it'll display JSON, TextView, SyntaxView etc.. why did not work Auto complete value display in auto9.php page. What is the mistake?

Also how do I display same time suburb name and territory and print valves use PHP echo.

<label for="pcode">Your post code: </label>
<input id="pcode">

 <script>
   $(document).ready(function () {

        $( "#pcode" ).autocomplete({
   delay: 10,
   minLength: 3,
   
            source: function (request, response) {
                $.ajax({
                    url: "http://www.tlcnewsletter.com.au/api/api/values?",
                    dataType: "json",
     
                    data: { pcode: request.term },
                    success: function (data) {
                        response($.map(data, function (item) {
                            return {
                                value: item.SuburbName,
                                label: item.SuburbName
                            };
                        }));
                    }
                });
            }
    
        });          
});
  </script>
AstroCB
  • 12,337
  • 20
  • 57
  • 73
Rob
  • 193
  • 5
  • 18

0 Answers0