Note that there are some explanatory texts on larger screens.

plurals
  1. POIssue on jQuery Ui Autocomplete From URL
    primarykey
    data
    text
    <p>Can you please let me know how I ca use the jQuery UI Autocomplete getting data from URL? currently I have a code which works fine foe me as:</p> <pre><code>var data = [ {"label":"Aragorn", "actor":"Viggo Mortensen"}, {"label":"Arwen", "actor":"Liv Tyler"}, {"label":"Bilbo Baggins", "actor":"Ian Holm"}, {"label":"Boromir", "actor":"Sean Bean"}, {"label":"Frodo Baggins", "actor":"Elijah Wood"}, {"label":"Gandalf", "actor":"Ian McKellen"}, {"label":"Gimli", "actor":"John Rhys-Davies"}, {"label":"Gollum", "actor":"Andy Serkis"}, {"label":"Legolas", "actor":"Orlando Bloom"}, {"label":"Meriadoc Merry Brandybuck", "actor":"Dominic Monaghan"}, {"label":"Peregrin Pippin Took", "actor":"Billy Boyd"}, {"label":"Samwise Gamgee", "actor":"Sean Astin"} ]; $(function() { $( "#search" ).autocomplete( { source:data, select: function( event, ui ) { $( "#search" ).val( ui.item.label + " / " + ui.item.actor ); return false; } }).data( "autocomplete" )._renderItem = function( ul, item ) { return $( "&lt;li&gt;&lt;/li&gt;" ) .data( "item.autocomplete", item ) .append( "&lt;a&gt;&lt;strong&gt;" + item.label + "&lt;/strong&gt; / " + item.actor + "&lt;/a&gt;" ) .appendTo( ul ); }; }); </code></pre> <p>and HTML:</p> <pre><code> &lt;input type="text" id="search" /&gt; </code></pre> <p><strong>BUT</strong> I need to get the data from stored json file on server(data.json.txt) instead of putting on the page. I tried to change <code>source:data,</code> to <code>source:data.json.txt,</code> but didn't work!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload