Hi,
   I am using a very basic AJAX code snippet with struts. No it's not
dojo. 

req = new XMLHttpRequest();
var url='http://localhost:8084/StrutsAjax/example/SearchAJAX.action';
req.open("POST",url,true);
req.onreadystatechange=searchResults;
req.send(null);       

in searchResults() function I just wnt to see req.responseText;

If I want to return some response from server side if I use something
crude like this

response.getOutputStream().print("<html>Animesh</html>");

It messes up struts and I get lots of exceptions in responseText.

I want to return some string from the server side which is accessible by
javascript code. It can be JSON or anything.

What should be the code on server side / my action class (execute
method) to return something to client side? Any suggestions??



Thanks,

Animesh


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to