Stumped by a ajax / form issue
Hi, I'm completely stumped by a problem I'm facing when I try to retrieve data from a REST service via ajax(). When I paste the URL into the browser, the return value (560Kb of plain text) shows up in the browser. But when I perform this via the ajax() call using GET, nothing is returned. The service is a Jersey service running on Tomcat. I've been using Firebug to track the ajax GET request and it says that 0 bytes were returned. But if I click the link that Firebug shows for the GET request, I see all the data coming back. This seems that the problem I'm facing is in the jQuery code.
The code I'm running is evaluated when the submit button is clicked:
$("#exportbtn").click(function() {
$.blockUI();
var pn = $("#selectplate").val();
var sn = $("#selectassay").val();
var formUrl = "http://localhost:8080/htsws/rest/moldev/export?plateName="+escape(pn)+"&settingsName="+escape(sn);
$.get(formUrl,
function(data) {
alert(data);
$("#results").html("<pre>"+data+"</pre>");
$.unblockUI();
$("#logger").html(formUrl);
}
);
return false;
});
Unfortunately, I can't provide a link to this form as it is behind a firewall, but I was hoping that somebody might have seen something like this before and might have any pointers as to where I could look to resolve this.