Note that there are some explanatory texts on larger screens.

plurals
  1. POAutocomplete searchbox for files (images); is it possible, how?
    primarykey
    data
    text
    <p>I want to give the user an autocomplete inputfield (with image in result) which searches a folder, /devices, filled with GIF's "AAU01-010.gif", "AAU01-020.gif".</p> <p><strong>I want them to be able to search on the name of the files.</strong> Since i couldn't find anything on the internet, is this possible, if so, how?!</p> <p>P.S. I took underlying code from another example online, still need to change it to my needs $(function() {</p> <pre><code> $("#my_ac").autocomplete({ source: [ { value: "Tom Hanks", label: "Tom Hanks", description: "Actor", image: "hanks.png" }, { value: "Termionator 2", label: "Termionator 2", description: "Movie", image: "terminator.png" } ], minLength: 1 }).data( "ui-autocomplete" )._renderItem = function( ul, item ) { var inner_html = '&lt;a&gt;&lt;div class="list_item_container"&gt;&lt;div class="image"&gt;&lt;img src="' + item.image + '"&gt;&lt;/div&gt;&lt;div class="label"&gt;' + item.label + '&lt;/div&gt;&lt;div class="description"&gt;' + item.description + '&lt;/div&gt;&lt;/div&gt;&lt;/a&gt;'; return $( "&lt;li&gt;&lt;/li&gt;" ) .data( "item.autocomplete", item ) .append(inner_html) .appendTo( ul ); }; }); </code></pre> <p>HTML</p> <pre><code>&lt;h3&gt;Ref_Devices&lt;/h3&gt; &lt;div style="height:300px;"&gt; &lt;input type="text" id="my_ac"/&gt; &lt;div class="list_item_container"&gt; &lt;div class="image"&gt;&lt;img src=""&gt;&lt;/div&gt; &lt;div class="label"&gt;&lt;/div&gt; &lt;div class="description"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre>
    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.
 

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