[RESOLVED] populating an <li> element
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:
Code:
$(".validation-summary-errors").append("<li class='errs'>" + response.failReason + "</li>");
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:
if (response.failReason) {
$(".errs").remove();
var fr = "{" + response.failReason + "}";
$H(fr).each(function (pair) {
$(".validation-summary-errors").append("<li class='errs'>" + pair.value + "</li>");
});
}
any ideas anybody?
Re: [RESOLVED] populating an <li> element
This is marked resolved but there is no posted solution.
If you figured this out on your own, please post your resolution as it might help others with the same or similiar problem.
Thanks. :)