countries DB logo

Documentation

Follow Upward Subdivisions

This standalone example loads the widget script with ?follow_upward=1 so selecting a subdivision that is also a country (like Guam, Puerto Rico, etc.) will automatically change the country to the parent country of that subdivision.

Script parameters: ?follow_upward=1

Try it: Select "Guam" from the subdivision dropdown and watch as the country automatically changes to "United States" and the subdivision shows "Guam"!

Live Example