GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Helo with postalCodeSearchJSON  XML
Forum Index -> General
Author Message
Cgull



Joined: 25/10/2012 11:23:26
Messages: 3
Offline

Hello,

The other problem I posted about is gone.

Now I have a different problem.

When running this url in the browser I get the JSON response no problem:
http://api.geonames.org/postalCodeSearchJSON?placename=Clarens&maxRows=10&country=ZA&username=cgull

But when I run it in my code:
Code:
request = 'http://api.geonames.org/postalCodeSearchJSON?placename=Clarens&maxRows=10&country=ZA&username=cgull';


I get this error in the console:
SyntaxError: invalid label
[Break On This Error]

{"postalCodes":[{"postalCode":"9707","countryCode":"ZA","lng"

Any idea what is wrong? I am attaching the php file where I call the webservice.

Thank you
 Description The php file that uses the webservice [Disk] Download
 Filesize 13 Kbytes
 Downloaded:  711 time(s)

Cgull



Joined: 25/10/2012 11:23:26
Messages: 3
Offline

Hi again,

I managed to fix this problem but now I have a different one, when there is more than one postal codes returned I get this error again.

It works fine when there is only one postal code returned.

Not sure what is wrong now.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team