Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Stored search suggestions (JavaScript)

Featured Replies

Ok so I'm working on a text input form that allows the user to enter the city they live in for their profile information.

 

However, I want it to give the user search suggestions (like Google when you're typing in a search query) to make it easier.

 

I want to keep the code short, so perhaps I could store all the cities in another page or code file?

 

Thanks in advance :)

  • Author

Yup, usually achieved using AJAX and the onkeyup event.

 

I have never used this, but it looks promising (and free): http://www.geobytes.com/free-ajax-cities-jsonp-api.htm

 

AJAX, aye?

 

Wish I knew what that was... :p

 

Thanks for the link, I'll check it out now :)

 

(You're welcome for the +1) XD

Edited by ThatGuy

Ha, sorry - it's the use of Javascript to make HTTP requests, and usually capture some data from the response. Basically allows you to do something without the user having to load another page, or reload the current page.

 

Check out jQuery's implementation, it makes it a bit easier for you: http://api.jquery.com/jQuery.ajax/

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.