That site does *NOT* use country/state/city drop downs. The city is free form text field, not a drop down.
Whether you do this all in JS
code, without needing AJAX or similar, will depend on the total number of *states* in all the countries on your list. I would say if you have no more than about 1000 states, total, then you can do it 100% on the client with no need for any server-side code, including AJAX.