I was posting the link to the postal code search page to show you what information is available in the geonames database. In the JSON example you have to type 'so51' to make it work. For your users you have to extract the first 4 characters to make it work, or the prefix extraction could be done on the geonames server side.
Yes it is possible, but it needs a little bit of javascript know-how. I suggest to read some javascript tutorials, as it is not a geonames related problem.