Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML Accessibility For Web Developers Build an Accessible Form Delivery Information Screen

Automatic City Lookup not working? (On my project or in source page's demo).

Hey, all,

Not super important, but I was playing around with the automatic city lookup tool that Anwar mentioned in the video. However, after linking my JavaScript to my index.html file and ensuring all was linked up correctly, it didn't work. I realized that the source page (which was linked in the teacher's notes) had a link to a demo page, near the bottom of the page. I clicked that to test it out, and it was not working either. I typed in numerous Zip codes and the only ones that would appear were the ones my browser had saved for me (I.e. my address that I have used to autofill many forms online).

I also noticed that the city lookup article in the teacher's notes was written in 2016. Is this tool out of date? I think it seems like a pretty cool tool and would like to know how to use it, but I haven't been able to figure it out.

If anyone knows, that'd be great, thanks!

1 Answer

Anwar Montasir
STAFF
Anwar Montasir
Treehouse Teacher

Hi Isaac, good question. It's very possible the article in the Teacher's Notes is indeed outdated.

There's a demo of this feature using an alternate service, the Ziptastic API.

Type a zip code into the form on the demo page and you'll see the form populated with the corresponding city, state, county, and country.

Reading the source code of the demo should give an idea of how the Ziptastic zip code lookup was set up.