June 1, 201214 yr 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
June 1, 201214 yr 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 Edited June 1, 201214 yr by andyl
June 1, 201214 yr 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... Thanks for the link, I'll check it out now (You're welcome for the +1) XD Edited June 1, 201214 yr by ThatGuy
June 1, 201214 yr 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