jquery - How find one msg to multi request response Ajax Data done -
hell send 3 request in ajax, webservice return me 3 success message show one.
exemple:
.done(function(shipdata) { var ship = $(shipdata); var msgerror = ship.filter('#alert'); if (msgerror == "invalid_shipto_town") { $("#ship-modal-data p").append("code postal, ville destinataire est erronée."); }; rum 3, show 1 code postal, ville destinataire est erronée. code postal, ville destinataire est erronée. code postal, ville destinataire est erronée.
thank u helpe me
append
add message p
tag each response, added 3 times if 3 errors.
use text
function overwrite p
content instead , you'll have single message @ end:
$("#ship-modal-data p").text("code postal, ville destinataire est erronée.");
Comments
Post a Comment