Updated package from RC2A for 2.3.1
I am working on a modified store so could not add overwrite files, however installation is not too much.
Original script by Mark "ecartz"
This add on addresses a missing feature and fixes a bug in address editing. In standard osCommerce, when you add or edit an address, you have to enter the state (or province or county or region or whatever it is called in your country) free hand into a text box. The desired feature being to select from a drop down to avoid typos, etc. Then, if you submit, it replaces your entry with a drop down menu of all the states in that country. However, if you selected the wrong country, you then have to change the country and submit the form to get the correct drop down. That's the bug.
This add on dynamically switches between drop down menus for the various countries. For example, with the default osCommerce install, it will allow you to select the United States as the country and then pick Alabama (or any of the other US states) from a drop down menu. Then, if you change your country to Canada, the drop down will show a list of Canadian provinces. If you pick a country that does not have any zones in the database, it will show the standard text input.
The add on also defaults the country to the store country setting.