Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8757845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:24:02+00:00 2026-06-13T14:24:02+00:00

I am using Bootstrap typeahead in a Google App Engine application, but its not

  • 0

I am using Bootstrap typeahead in a Google App Engine application, but its not working.

My HTML:

<div class="well">
  <input type="text" class="span3" id="search" name="search"
         data-provide="typeahead" data-items="4" />
</div>
<script>  
  $('#search').typeahead({
    ajax: { url: '/SearchCity', 
    triggerLength: 1 }
 });
</script>

And my Python code:

class SearchCity(webapp2.RequestHandler):
    def post(self):
        data = ['cat','dog','bird', 'wolf']
        data = json.dumps(data)         
        self.response.out.write(data)

Why is the autocompletetion not working? What is wrong with this code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:24:03+00:00Added an answer on June 13, 2026 at 2:24 pm

    The typeahead expects the choices to be in an options variable. Convert your view to this:

    class SearchCity(webapp2.RequestHandler):
        def post(self):
            data = ['cat','dog','bird', 'wolf']
            data = json.dumps({'options': data}) #Changed line
            self.response.out.write(data)
    

    Also, your HTML might need some changes, try the following:

    $('#id_chain').typeahead({
      minLength: 1,
      source: function (query, process) {
        return $.get('/SearchCity', function (data) {
          return process(data.options);
        });
      }
    });
    

    Disclaimer here is that you don’t specify the version of Bootstrap you are using… this is working with v2+ of the framework.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using bootstrap-datepicker.js and it is working fine. <div class=well> <div id=dp5 class=input-append
I'm using the Twitter bootstrap-typeahead plugin with an HTML form: http://twitter.github.com/bootstrap/javascript.html#typeahead which is working
I'm using bootstrap-wysihtml5-rails in my rails app, all is working well until I attempt
Using Bootstrap Responsive - HTML appears like... <div class=row-fluid Center> <div id=divMapCanvas class=span6> <div
using twitter bootstrap typeahead i get google chrome suggestion list above typeahead list $(document).ready(function
I'm using twitter bootstrap in my application. I want to use the typeahead in
I'm using the rottentomatoes movie API in conjunction with twitter's typeahead plugin using bootstrap
I'm using Bootstrap on a web app that has some pages that contain iframes.
I am playing with a simple HTML page using Bootstrap and I would love
In a web app I am developing I display a Modal dialog using Bootstrap.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.