www.webdeveloper.com
Results 1 to 4 of 4

Thread: displaying itesm like datalist

  1. #1
    Join Date
    Jan 2008
    Posts
    16

    displaying itesm like datalist

    Hi

    I have an xml result and I am displaying the values from 1-4 on one row using javascript. Now I want to display those resutls from 1-8 in 2 rows that means in first row 4 results and in second row 4 results (Like we do it with DataList). How can this be done? Here is sample where I display 1 results under doXtop application http://dxpningbeta.ning.com/

    Any Ideas please!

    Thanks in advance.

  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,391
    Question:
    Are the values in an array or are they separately defined variables?

  3. #3
    Join Date
    Jan 2008
    Posts
    16

    displaying itesm like datalist

    Hi

    thanks for your email. I have the values in xml doc which we retrieve the values like below:

    For eg, if docs has the xml nodes and we retrive the childnodes and render them with JS.

    for (var i=0; i<docs.childNodes.length; i++)
    {
    var node = docs.childNodes[i];
    }

    But I want to render them like in two rows. Any Ideas please.

  4. #4
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,391

    Arrow

    Only a guess from the code amount given, but you could try:
    Code:
    for (var i=0; i<4; i++) { var node = docs.childNodes[i]; }
    for (var i=4; i<docs.childNodes.length; i++) { var node = docs.childNodes[i]; }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles