GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
JSON service in combination with IE6: no data returned  XML
Forum Index -> General
Author Message
borkhuis



Joined: 21/06/2006 13:28:19
Messages: 2
Offline

First of all: thank you for this great service. It really saves a lot of time when building an interface to for example Google Maps!

Now my question.
I am having problems with the JSON service in combination with IE. I have a search box, where users can enter a placename. Next to the box is a Search-link, and this calls a Javascript function to request data from Geonames.
When requesting data from Geonames for some reason it looks like the request is not sent out. In the example below I print the URL that is used to request data to the screen, and this looks OK to me. But the callback function is not called.
But when I do a <Shift>+<Click on search-link> (so AFAIK ignoring the cache) the callback function is called and places are displayed on the page, together with the URL.
I use the jsr_class.js script as provided under Export (in the example the code is included).
What am I doing wrong here?

When using Firefox the system works perfectly, so it looks like a IE/cache problem to me.

See the following link for an example:
http://www.borkhuis.com/TestGeonames.html
[WWW]
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

Hi borkhuis

IE seems to have a problem with the combination of onClick and href.
<a href="javascript:;" onclick="search_loc();">Zoeken</a>

Your example is working for me if either I replace the empty statement with the search_loc function :

<a href="javascript:search_loc();" >Zoeken</a>

Or if I add a 'return false;' in the onClick call :
<a href="javascript:;" onclick="search_loc(); return false;">Zoeken</a>

Hope this helps

Marc

[WWW]
borkhuis



Joined: 21/06/2006 13:28:19
Messages: 2
Offline


Or if I add a 'return false;' in the onClick call :
<a href="javascript:;" onclick="search_loc(); return false;">Zoeken</a>  


Thank you very much, that did the trick!
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team