Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5988585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:58:44+00:00 2026-05-22T22:58:44+00:00

Let’s say a user from a global site selects his/her country from a drop

  • 0

Let’s say a user from a global site selects his/her country from a drop down list. I would like to present the user with a list of suburbs of that country.

The problem I find is that it may be a lot of work populating the SQL database with country-suburb relations. And having done that, I would imagine each user would have to load the list of suburbs dynamically from the database which doesn’t scale too well.

Another way is to use JavaScript and hard code the suburbs so they come up when the country is selected. Again this way seems like a lot of work too each time I enter a new country market, and I’ve to have thousands of suburb entered.

I’ve seen some Web Service a while ago which seems to be able to do the job (I can’t remember the link). What is the best practice to list the suburbs dynamically based on the country selected?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:58:44+00:00Added an answer on May 22, 2026 at 10:58 pm

    Keep the master pairings in your database, but then push each country out to a JSON file (possibly on your CDN) that gets loaded dynamically and populates your select field whenever a country is chosen. Whenever you make a change in your database, re-push the respective JSON file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have an facebook application running using the JS SDK. First user
Let's say I have a list of objects TheListOfObjects. If I write this: TheListOfObjects
Let's say a user is visiting my app website for the first time, so
Let's say I have a javascript array with a bunch of elements (anywhere from
Let's say we have a simple function defined in a pseudo language. List<Numbers> SortNumbers(List<Numbers>
Let's aggregate a list of free quality web site design templates. There are a
Let's say I need to scroll a very long list of tweets on twitter.
Let's say I have rows of data retrieved from a relational database tables (perhaps
Let's say I have a user class with columns name and email: Class User
Let's consider the following scenario: a function which can generate code colors from white

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.