Jump to content

autocomplete() generating non-text output


paulclift

Recommended Posts

I have an autocomplete() function connected to a MYSQL database.

The jquery is completely run of the mill: 

   $(function() {
        $(".choose_venue").autocomplete({
            source: "list_venues.php",
            minLength: 1
            });                
        });

...and if I manually add a query such as "list_venues.php?term=Ku" onto the URL of list_venues.php, then that page gives a appropriate response (such as the following):

[{"name":"Fonderie Kugler"},{"name":"Kulturhaus Helferei"},{"name":"Kunstraum Walcheturm"}]So, a simple `input` such as the following *should* be working:
    

    <input type="text" style="width:270px;" class="choose_venue"/>

However, the output I get is a window containing no text, but just a number of faint lines.

 

I first thought that this might be something in my CSS, but the problem persists even when ALL css modifications have been removed.

My next thought was that it might be a browser issue (I use Safari), but Chrome behaves exactly the same way.

The only other idea I had was that the jquery files I was calling were out of date or that there was some other problem, but I tried multiple links and I always get the same result. As of my most recent attempts I am linking to the following files:

    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>


It appears that the number of these grey lines corresponds to the number of text values that should be returned. But beyond that, I have no idea what is causing this.

Screen Shot 2018-12-15 at 09.30.55.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...