/assignment4

AJAX

Primary LanguageCSS

assignment4

AJAX

In the template files provided, you are going to create a predictive search feature.

I have created a simple API that you will use ajax to request a json object with search terms. Upon typing a character that one of the words on the list begins with, a function will fire that will begin to display matches as the user continues to type. This functionality will be similar to when you perform a google search, as you type, google shows you different results as you type that contain links to take you to the result you choose.

YOU MAY NOT USE JQUERY AUTOCOMPLETE WIDGET OR ANY OTHER AUTOCOMPLETE METHOD OTHER THAN YOUR OWN

All of the code for this must be written by you. You are free to use vanilla js, or jQuery to get the job done. The search results should be styled to match the existing form aesthetic.

There are a few easter eggs hidden in the api that you can find by messing with the request url, there are some headers you can find in the response object, all kinds of fun things.

The url for the API is http://www.mattbowytz.com/simple_api.json You can put a number of query parameters at the end of the url to get different data.

?data=all, ?data=interests, ?data=programming, ?data=comics

You can use any of the data to do anything you want for this as well.

Bonus Points

Make the autocomplete results into clickable links that will take you to google search results in a new tab.

Let me know if you have any questions!