var $data=$("#dialogform").serialize();
var request = $.ajax({
url: $url,
type: "POST",
cache: false,
dataType: "html",
data: $data,
});
request.done(function(response){
/*update div in dialog OR close dialog and update div in main view*/
});
Depending on the view that was returned by the server, function(response) must either update the div in the dialog, or close the dialog and update the div in the main page.
What is the best way for this function to determine which view was sent by the server?