I have grails server on http://mysite.com:8086/project/
ApiController renders some text(html code in my case) http://mysite.com:8086/project/api/lastorders
I have another server http://othersite.net/ - this is simple apache server with HTML page.
I want to show text returned from server on my page.
I've tried:
<script type="text/javascript">
new Ajax.Request( "http://mysite.com:8086/project/api/lastorders", {
method: 'get',
onSuccess: function(response){
alert(response.responseText);
},
onFailure: function(){
alert('ERROR');
}
});
</script>
But response is empty...