I have an ajax call as below:
$.ajax({
type: "GET",
url: "process.php",
data: dataString,
success: function( response ) {
$('#in-progress').hide();
$('#mydiv').html(response)
.append("")
}
});
What I want is, that I need to get the distinguished message from process.php. What should I do in thid regard so that I may not parse the message myself. I need to send some specific code or something from my process.php so that the ajax can process it separately. Shall I use some http response code and use it in statusCode ? What is the appropriate practice to do that ?
e.g. Success message will be "This is Success" Error message will be "There is an unknown error" - This message should be treated separately. Any idea ?