Made an ajax call to the server and am displaying the response in a dojo dialog now my problem is the server returns 3 results like a success, input and processing. if the result is processing the response should be displayed as separate jsp where as for success it should be renderd in the popup. now for me everything is coming in the popup irrespective of the result. any pointers on how to implement this.