Hi All,
In an ajax call I have data returned in my response object. against an attribute failReason such that response.failReson returns in the form:
1 : text1, 2: text2, 3: text3.
if I do the following then I recive everything on a single line as you would expect:
what I really want is to see text1, text2, text3 as a list. So I thought I'd try the following but JQuery simply doesn't like it:Code:$(".validation-summary-errors").append("<li class='errs'>" + response.failReason + "</li>");
any ideas anybody?Code:if (response.failReason) { $(".errs").remove(); var fr = "{" + response.failReason + "}"; $H(fr).each(function (pair) { $(".validation-summary-errors").append("<li class='errs'>" + pair.value + "</li>"); }); }




Reply With Quote