This looks like a simple problem with a simple solution. I believe Ajax is useful, but not a cure for all ailments and certainly not in this case.
There is (a) a 1-1 relation between the country code and the country name and (b) you display all the country codes already in the box, so there is no need for any fancy and heavy solution. You can use a simple dropdown box that holds all data.
Make one drop down select box with the country name as the value and the country code as the text part of the option. As follows:
- <option value='country_name'>country_code</option>
The user selects the country code presented to him/her and the value of the selected box (i.e. country_name) is passed to you and you can display it onto the screen.
Ronald :cool: