Cgull
Joined: 25/10/2012 11:23:26
Messages: 3
Offline
|
Hello,
This is the first time I am using web services and I have no knowledge in JSON.
I copied the example from the documentation here:
http://www.geonames.org/export/ajax-postalcode-autocomplete.html
to a site on my local machine.
It worked fine but suddnely stopped working and I get these errors in the console:
SyntaxError: syntax error
[Break On This Error]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//E
On this file: http://api.geonames.org/export/geonamesData.js?username=demo
And
ReferenceError: geonamesPostalCodeCountries is not defined
[Break On This Error]
if (geonamesPostalCodeCountries.toString().search(country) == -1) {
Can you maybe help me find the problem?
Another help I need is with coding what I actually need which is when the user enters a city he gets the post codes list and not the other way arround.
Not sure how to do that.
Thank you
|