Gosh, you're so close. If you change this method: function fnClickAddEmail() { var email = $("input#email").val(); $.post( "validateEmail.do", {sendValue: email}, function(returnValue){ //Does this function called even my email is invalid? Am I getting email.jsp page in "returnValue"? addToTable(returnValue); }, "text" ); }
To this: function fnClickAddEmail() { var email = $("input#email").val(); $.post( "validateEmail.do", {sendValue: email}, function(returnValue){ if (returnValue == "") { // Show Error Message } else { addToTable(returnValue); } }, "text" ); } This should get your implementation working for you. You're still not utilizing JSON, but with the modified method it should work for you. Beez --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org