Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7805599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:16:39+00:00 2026-06-02T02:16:39+00:00

This is my example below. I’am using knockout.mapping plugin in my project. I want

  • 0

This is my example below.
I’am using knockout.mapping plugin in my project.

I want to fill the “from” element inside mails array to My Un Ordered list :

In the commented code I add the data that retrived form the database by using jquery ajax.

<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/knockout-2.0.0.debug.js" type="text/javascript"></script>
    <script src="js/KnockoutMapping2.1.1.js" type="text/javascript"></script>
    <script type="text/javascript">

        $(document).ready(function () {
            var viewModel = {};

            $.ajax({
                url: "Service.aspx",
                type: 'POST',
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                success: function (data) {
                    //data :
                    //       {
                    //   "id":"Inbox",
                    //   "mails":[
                    //      {
                    //         "id":"1",
                    //         "from":"Abbot ",
                    //         "to":"steve@example.com",
                    //         "date":"May 25, 2011",
                    //         "subject":"Booking confirmation #389629244",
                    //         "folder":"Inbox"
                    //      }
                    //   ]
                    //}
                    viewModel = ko.mapping.fromJS(data);

                    ko.applyBindings(viewModel);
                },
                error: function (request) {
                    alert(request.responseText);
                }
            });




        });
    </script>
</head>
<body>
    your id is : <span data-bind='text: id' />
    <ul data-bind="foreach : mails">
        <li data-bind="value:from"></li>
    </ul>
</body>
</html>

Any help who to bind mails to my list.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:16:40+00:00Added an answer on June 2, 2026 at 2:16 am

    http://jsfiddle.net/nickolsky/EVaPL/

    your id is : <span data-bind='text: id' ></span>
        <ul data-bind="foreach : mails">
            <li data-bind="text:from"></li>
    
    1. Do not self-close span
      ( Can a span be closed using <span />? )
    2. Use text binding instead of value binding for li
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This example below illustrates how to prevent derived class from being copied. It's based
This example is JavaScript, since that's where I'm using callbacks mostly. I want to
this example below works when hover event is trigered and when its not, its
Given the example below, can someone please show me how this could be called?
In the Jquery example below, I would like to expand $(this) before it is
I've simplified my JavaScript code to the example below; this code is giving me
For some reason I'm not getting this. (Example model below) If I write: var
UPDATE 2011.09.13 This bug has been resolved by Adobe. The example code below now
I know how to do this... I'll give example code below. But I can't
This example is from php.net: <?php function Test() { static $a = 0; echo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.