struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fea jabi <zy...@hotmail.com>
Subject Textfield onchange --> handling ajax error response to show action errors
Date Fri, 28 Aug 2015 15:14:59 GMT
  text-field onchange ---> making ajax call.
 

onsucess ---> everything works fine as needed
 

on failure ----- > like user entered wrong data ---> How to show the error messages
in jsp. I added fieldError but not sure how to show it in jsp with the ajax stuff.
 
In jsp
<s:actionerror/>
....................
 
<script>        ........$.ajax({

            url: "ajax/retrivexxxAJAXAction.action"+"?jsonRequestdata="+JSON.stringify(json),
type: 'POST',
dataType: 'json',           


            success:function(response){
.......................
 }error:function(jqXhr, textStatus, errorThrown){

                alert(textStatus);}

});
........
 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message