Results 1 to 2 of 2

Thread: [RESOLVED] populating an <li> element

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    Resolved [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?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width