facebook

Dynamtic loading of list not work

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #322929 Reply

    derrick@mydlm.com
    Participant

    I’m using the following code to load a list box. The code works in MobiOne Design Center but not on my iPhone. Please help.

    var list = $(‘#m1-QpidListScreen-objList’);
    //remove current list items
    list.children(‘#m1-QpidListScreen-objListItem’).remove();

    var xmlDoc = xmlhttp2.responseXML;
    var x = xmlDoc.getElementsByTagName(“Table”);
    for (i=0; i < +x.length; i++) {
    //build list hg
    firstItemClass = ‘m1-first’;
    internalItemClass = ‘ m1-clickable m1-hyperlink m1-hyperlink-internal’;
    lastItemClass = ‘ m1-last’;

    //build list css class list
    cssClassList = i==0 ? firstItemClass : ”;
    cssClassList += i==x.length ? lastItemClass : ”;
    cssClassList += internalItemClass;
    list.append(
    ‘<li id=”m1-QpidListScreen-objListItem” class=”‘ + cssClassList + ‘” href=”#ProfileViewerScreen:DEFAULT”>’+
    ‘ <img id=”m1-QpidListScreen-accessoryImage1″ src=”res/images/tableRowDisclosureIndicator.png”/>’ +
    ‘ <div id=”m1-QpidListScreen-text1″ class=”m1-text”>’ + (xmlDoc.getElementsByTagName(“ScreenNm”)[i].childNodes[0].nodeValue) + ‘</div>’
    );
    //alert((xmlDoc.getElementsByTagName(“ScreenNm”)[i].childNodes[0].nodeValue) );
    }

Viewing 1 post (of 1 total)
Reply To: Dynamtic loading of list not work

You must be logged in to post in the forum log in