facebook

Custom list unable to click

💡
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 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #342768 Reply

    NeoLaiSoon
    Member

    I am a newbie.

    1. Created custom list when apps launch, but custom list not clickable.

    See attachment listnote.mobi

    Try solutions found on this forum…
    phoneui.preprocessDOM(‘#m1-listnote’)
    phoneui.preprocessDOM(‘#m1-listnote-list1’) all don’t work, pls help.

    2. The Populate Custom List example share by Wayne, the updateLandingScreen() done not show correctly on iOS7.

    See attachment photo 2.PNG

    #342769

    NeoLaiSoon
    Member

    the attach file

    Attachments:
    You must be logged in to view attached files.
    #342790

    NeoLaiSoon
    Member

    Hi,
    Any one can help? Attached the listnote sample, many thank!

    Attachments:
    You must be logged in to view attached files.
    #342903

    @innoreal,

    There was a problem in the creation of your list. More specifically on this part. See highlighted code:

    var itemCnt = results.rows.length;
    itemCnt = +itemCnt;

    //remove current list items
    list.children(‘#m1-listnote-listItem1’).remove();

    //build list
    firstItemClass = ‘m1-first’;
    internalItemClass = ‘ m1-clickable m1-highlight m1-hyperlink-internal’;
    lastItemClass = ‘ m1-last’;

    for (i=0; i <= itemCnt; i++) {
    //…
    //…

    //build list css class list
    cssClassList = i==0 ? firstItemClass : ”;

    Note that itemCnt value is 3 at the beggining. But the first element’s index is 0, so when you declare in your for that i should be <= than itemCnt there is a javascript error because there is not a 4th item in the local database. So, your options are to declare your for either two ways:

    for (i=0; i < itemCnt; i++) {

    or

    for (i=0; i <= itemCnt-1; i++) {

    Hope this make sense. Let me know if you need the modified custom.js file.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Custom list unable to click

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