Note that there are some explanatory texts on larger screens.

plurals
  1. POTwitter Bootstrap Typehead from textfile
    text
    copied!<p>I am trying to use typehead in twitter bootstrap.</p> <p><a href="http://twitter.github.com/bootstrap/javascript.html#typeahead" rel="nofollow">http://twitter.github.com/bootstrap/javascript.html#typeahead</a></p> <p>If suppose i want to display elements from a specific text file. how can I do that? I am aware of basic typehead but how can I retrieve the values from a text file for typehead?</p> <p>For example like:</p> <pre><code>&lt;input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="4" data-source='["Apples","Bananas","Cherries","Dates","Eggplants","Figs","Grapes", "Honeydew","Kiwi","Mango","Peaches","Plums","Raspberries","Strawberries","Watermelon","Zucchini"]'&gt; </code></pre> <p>Here is my search-box code, I just want to integrate it. </p> <pre><code> &lt;br&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;div class= "well"&gt; &lt;center&gt; &lt;div class="content-inner"&gt; &lt;h1 class="pump-up"&gt;Find your Desired Course and Learn!&lt;br&gt; &lt;strong&gt;Boom, it's that easy.&lt;/strong&gt;&lt;/h1&gt; &lt;div class="full-search-bar"&gt; &lt;ul class="item-stream unstyled search-input-stream"&gt; &lt;li class="stream-item stream-header search-input-item"&gt; &lt;form class="form-inline search-form" action="webcrawler.php" method = "post"&gt; &lt;input class="xlarge" name="coursename1" type="text" placeholder="Java,Python,Ruby..You name it &amp; We got it!" /&gt; &lt;button class="btn btn-large btn-inverse" type="submit"&gt;&lt;i class="icon-search icon-white"&gt;&lt;/i&gt;&lt;/button&gt; &lt;/form&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/center&gt; &lt;/div&gt; </code></pre> <p>Thanks!</p>
 

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