Hi,
I am working with a Java application, and I have ajax form submission from a modal window. I would like the code to load either success or error page in the modal depending on the server side processing results. The following code is working for the success scenario only.
$.ajax({
type: "POST",
url: action,
data: params,
success: function() {
$("#p_content").load("/test.jsp?id=12345");
}
});
I am fairly new to ajax, but from what I understand it is not enough to add the "error:" portion to the script above, it will not detect errors in my servlet code. Is there any way I can read a request parameter from inside this function? Or perhaps I can use something else? Please help!
Thanks, natasha