Hi,

I'm not sure, but I think you can't make cross-domain connections
using AJAX (in many browsers). You have to use iframes or look for
javascript framework (like jquery) which offers crossdomain AJAX.

Cheers,
Michal B.

On 15 Gru, 23:46, berlu87 <[email protected]> wrote:
> Hy guys, I have a problem with geocoding via HTTP.
> I perform a request but I recieve a null response!
> My javascript functions are:
>
> var xmlhttp;
> function vai(){
>         xmlhttpw=GetXmlHttpObject();//init richieste Ajax
>         if (xmlhttpw==null){
>              alert ("Your browser does not support AJAX!");
>              return;
>         }
>         var url="http://maps.google.com/maps/geo?
> q=45.7209941,8.9903139&output=xml&sensor=false&key=MYKEY";
>
>         xmlhttpw.onreadystatechange=stateChanged;
>         xmlhttpw.open("GET",url,true);
>         xmlhttpw.send(null);
>
> }
>
> function stateChanged(){
>         if (xmlhttpw.readyState==4){
>                 alert("4!!!");
>                 var resp=eval("(" + xmlhttpw.responseText + ")");
>                 alert(resp);  //resp is null!!!
>         }
>
> }
>
> function GetXmlHttpObject(){
>         if (window.XMLHttpRequest)
>         {       // code for IE7+, Firefox, Chrome, Opera, Safari
>                 return new XMLHttpRequest();}
>         if (window.ActiveXObject)
>         {       // code for IE6, IE5
>                 return new ActiveXObject("Microsoft.XMLHTTP");}
>         return null;
>
> }
>
> thanks for your help!!!

--

You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Reply via email to