autocomplete source=test.php

autocomplete source=test.php

Hello NG,

switching autocomplete from JQuery-Plugin to JQuery UI makes some trouble. Using a Javascript-array for "source" all went fine. Changing source to an php-Page nothing appears on screen. Debugging with firebug "test.php?term=xxx" is sent to the server, the  answer is:

HTTP/1.1 200 OK
Date: Thu, 17 Mar 2011 15:43:34 GMT
Server: Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 PHP/5.3.5 mod_ssl/2.2.9 OpenSSL/0.9.8g
X-Powered-By: PHP/5.3.5
Content-Length: 84
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: text/html









I reduced the JQuery UI Demo-Code to essential things:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <title>Testpage</title>
        <link type="text/css" href="../styles/JQueryUI/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" >   
        <script type="text/javascript" src="jQuery/jquery-1.4.4.min.js"></script>
        <script type="text/javascript" src="jQuery/jquery-ui-1.8.10.custom.min.js"></script>
    </head>
    <body>
        <script>
            $(function() {
                var availableTags = ["ActionScript","AppleScript","Asp","BASIC","C"];
                $( "#langs" ).autocomplete({
                    source: availableTags,
                    source: "test.php",
                    minLength: 2,
                });
            });
        </script>
        <div class="demo">
            <div class="ui-widget">
                <label for="langs">Languages: </label>
                <input id="langs" />
            </div>
        </div>
    </body>
</html>





























test.php:
<?php
    $var = array("ActionScript","AppleScript","Asp","BASIC","C");
    print_r($var);
?>




How can i fix/debug it?

have a nice day

Rolf