facebook

splice function is acting incorrectly on iphone : CLOSED

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #344330 Reply

    I am using 2D array to store items, and display them in a list.
    I have a delete button in the list that, removes particular item using splice function.

    The delete works correct on the mobi test center & also on browser. But on iphone the delete function runs 3 times, and deletes 3 items from the list.

    Below is the page http://www.globalgraffiti.net/clients/mobionetest/form-landing-screen3.html
    on products tab
    click on Add Part button to add parts to the summary list below. Multiple items can be added.

    Can anyone point me, what needs to be fixed.

    #344343 Reply

    Hi globalgraffiti,

    The problem seems to be related with that handlers are running multiple times because of incorrect elements deletion, please try removing elements with $(‘#m1-form-landing-screen3-list1’).empty() instead of Summarylist.html(”); in ClearSummaryList() function.

    #344374 Reply

    I tried the above code…still it is not working on Iphone…It works perfectly on Chrome , Safari and the test center.

    The RemoveSummaryListItem(SummaryArrayid) function is called multiple times for a single click. I am not sure why it is called multiple times. I put a alert and it executed multiple times.

    If possible can you please let me know…is there is any other way of adding and deleting the list items.

    #344950 Reply

    any more suggestions?

    #344964 Reply

    Hi globalgraffiti,

    Would you share your project files with us to take a deeper look? It would help us to find the issue easier and quicker. Please send a zip file with the files to support at genuitec dot com using title mobione data from globalgraffiti

    #344977 Reply

    I fixed this issue somehow, not sure exactly what i did. But i think there were to many instances of phoneui.preprocessDOM(‘#DIVS’); and after i removed them it works.

    Im not sure if reprocessing the DOM multiple times triggers functions multiple times.

    #345105 Reply

    Hi globalgraffiti,

    Thanks for following up sharing your success. I am closing the thread.

    >Im not sure if reprocessing the DOM multiple times triggers functions multiple times.
    Yes, it sounds very likely it was the problem.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: splice function is acting incorrectly on iphone : CLOSED

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