It still add blank row in table when invalid.
Anjib
On 12/3/2010 11:36 AM, Biesbrock, Kevin wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org