Hey everyone,
I know there have been a lot of questions concerning dojo.xhrGet and IE, but after searching, I have not been able to find one that relates to my problem.
Basically, here is the set up:
I have a custom widget that, upon pressing a button, calls dojo.xhrGet with the following attributes:
url: "myServlet.jsp",
handleAs: 'xml',
preventCache: true,
error: function(response, ioArgs) {alert("failed xhrGet");},
content: { Number: myInput },
load: dojo.hitch(this, function(response, ioArgs) {
//...extract output from response xml node and display....
})
Basically, it sends the myInput, and handles the response which comes back in an XML tree.
This is what the XML tree looks like when the servlet sends it back:
<ajax-response>
<response>
...theResponse...
</response>
</ajax-response>
basically, the response is just a text in the xml that is parsed by the load method and displayed on the screen.
This works perfectly fine in Firefox (firebug shows no errors), but when I use IE7, I get no response at all. I have tried putting alerts (since that is the only way of debugging in IE that I know how) throughout the code, and I have determined that the outbound call is made (xhrGet), but nothing responds. I'm pretty sure the server sends the response, just the xhrGet method does not pick it up and dump it to the load method. It does not even go to the error method, so it does not seem like there is a server side problem. It literally just stops.
What is going on? I cannot figure out what is broken, and it seems like it should work since it works like a charm in Firefox.
Any ideas?
Thanks in advance!

Check the Content-Type HTTP
Check the Content-Type HTTP header in the response: it has to be a content type that IE recognizes as an XML content type. I do not remember them offhand, but text/xml may work.
SOLVED
Thanks for the reply.
You brought up a good point, and after checking Firebug, it seems that there is no content-type response header being sent, even though on the jsp servlet file, i have <%@ page contentType="text/xml"%> directive set up.
Seems as though it is not being sent back to the server, while the xml itself is.
I guess that problem is out of the scope of this forum though (unless someone knows what is wrong!).
Thanks for the help.
SOLVED: I found out the problem. I had to explicitly set response.setContentType("text/xml") instead of using the page directive. I guess the way I was doing it (using out.print's to output all the xml info) caused the page directive not to get transferred to the response. Maybe not, but using the setContentType method for response seemed to fix the problem.
-Mike M