Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!

Anwar Montasir
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.