Hi,<div><br></div><div><div>I am returning a JSON to a GeoExt app and this is the code that is collecting the return,</div><div><br></div><div>    var control = new OpenLayers.Control.Click({</div><div>                          trigger: function(evt) {</div>

<div>                          var lonLat = evt.xy;</div><div>                          if (popup) popup.close();</div><div>                          var  request = Ext.Ajax.request({</div><div>    <span class="Apple-tab-span" style="white-space:pre">                         </span>      url:"<a href="http://128.196.142.94:9000/info?lat=">http://128.196.142.94:9000/info?lat=</a>"+ panel.map.getLonLatFromViewPortPx(lonLat).lat +"&lon=" + panel.map.getLonLatFromViewPortPx(lonLat).lon,</div>

<div>                          disableCaching: false,</div><div>                          success: function(response) {</div><div>    <span class="Apple-tab-span" style="white-space:pre">                                             </span>      var obj = Ext.decode(response.responseText);</div>

<div>    <span class="Apple-tab-span" style="white-space:pre">                                          </span>      console.log(obj);</div><div>    <span class="Apple-tab-span" style="white-space:pre">                                          </span>      console.dir(obj);</div><div>    <span class="Apple-tab-span" style="white-space:pre">                                          </span>      addToPopup(lonLat, response.responseText);</div>

<div>    <span class="Apple-tab-span" style="white-space:pre">                                  </span>      },</div><div>    <span class="Apple-tab-span" style="white-space:pre">                                 </span>  failure: function(response) {</div><div>    <span class="Apple-tab-span" style="white-space:pre">                                          </span>      console.log('server-side failure with status code ' + response.status);</div>

<div>    <span class="Apple-tab-span" style="white-space:pre">                                          </span>      addToPopup(lonLat, "Server side Failure");</div><div>    <span class="Apple-tab-span" style="white-space:pre">                                               </span>  }  </div>

<div>                                 //callback: myhandler</div><div>                     });</div><div>    }});</div><div><br></div><div>I wish to obtain the returned JSON and then assign it to the popUp but whenever I try to connect to the App it is returning the following error,</div>

<div><br></div><div>    OPTIONS <a href="http://128.196.142.94:9000/info?lat=55.44873046875&lon=-118.17626953125">http://128.196.142.94:9000/info?lat=55.44873046875&lon=-118.17626953125</a> 405 (Method Not Allowed)</div>

<div>    XMLHttpRequest cannot load <a href="http://128.196.142.94:9000/info?lat=55.44873046875&lon=-118.17626953125">http://128.196.142.94:9000/info?lat=55.44873046875&lon=-118.17626953125</a>. Origin null is not allowed by Access-Control-Allow-Origin.</div>

<div>    test.html:222server-side failure with status code 0</div><div><br></div><div>If you simply pass the url `<a href="http://128.196.142.94:9000/info?lat=55.44873046875&lon=-118.17626953125`">http://128.196.142.94:9000/info?lat=55.44873046875&lon=-118.17626953125`</a> you will obtain the JSON but for some reason there is failure that keeps occurring in the application.</div>

</div><div><br></div><div>Is there CORS that can be used in the OpenLayers or GeoExt. I have tried using ExtJS JSON-P but I am not sure what should I enter in the 'callback' of,</div><div><br></div><div><script src="<a href="http://domainB.com/users?callback=someCallback">http://domainB.com/users?callback=someCallback</a>"></script></div>

<div><br></div><div><div><br></div>-- <br>Thanks & Regards<div>Smaran Harihar</div><br>
</div>