<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hi,</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><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 style="white-space:pre-wrap">                                </span>      url:&quot;<a href="http://128.196.142.94:9000/info?lat=" target="_blank" style="color:rgb(17,85,204)">http://128.196.142.94:9000/info?lat=</a>&quot;+ panel.map.getLonLatFromViewPortPx(lonLat).lat +&quot;&amp;lon=&quot; + panel.map.getLonLatFromViewPortPx(lonLat).lon,</div>

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

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

<div>    <span style="white-space:pre-wrap">                                        </span>      },</div><div>    <span style="white-space:pre-wrap">                                        </span>  failure: function(response) {</div><div>    <span style="white-space:pre-wrap">                                                </span>      console.log(&#39;server-side failure with status code &#39; + response.status);</div>

<div>    <span style="white-space:pre-wrap">                                                </span>      addToPopup(lonLat, &quot;Server side Failure&quot;);</div><div>    <span style="white-space:pre-wrap">                                                </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&amp;lon=-118.17626953125" target="_blank" style="color:rgb(17,85,204)">http://128.196.142.94:9000/info?lat=55.44873046875&amp;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&amp;lon=-118.17626953125" target="_blank" style="color:rgb(17,85,204)">http://128.196.142.94:9000/info?lat=55.44873046875&amp;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&amp;lon=-118.17626953125" target="_blank" style="color:rgb(17,85,204)">http://128.196.142.94:9000/info?lat=55.44873046875&amp;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 style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

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 &#39;callback&#39; of,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">&lt;script src=&quot;<a href="http://domainb.com/users?callback=someCallback" target="_blank" style="color:rgb(17,85,204)">http://domainB.com/users?callback=someCallback</a>&quot;&gt;&lt;/script&gt;</div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">

Thanks,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Smaran</div>