Page 2 of 3

'value change' event for the toggle inside a dynamic list

Posted: Fri May 03, 2013 9:30 pm
by maxkatz

I create the list in Appery.io:

Image


'value change' event for the toggle inside a dynamic list

Posted: Fri May 03, 2013 9:37 pm
by Rafael Martínez

Me too, I am using Appery UI and the "value change" event is triggered on page load for every row....

Find it here:

http://appery.io/app/view/31c79da2-60...


'value change' event for the toggle inside a dynamic list

Posted: Fri May 03, 2013 9:41 pm
by maxkatz

Try removing the list and then adding it back, with the event.


'value change' event for the toggle inside a dynamic list

Posted: Fri May 03, 2013 9:55 pm
by Rafael Martínez

The same....alert for every row in page load:

http://appery.io/app/view/31c79da2-60...


'value change' event for the toggle inside a dynamic list

Posted: Fri May 03, 2013 9:59 pm
by maxkatz

Share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a


'value change' event for the toggle inside a dynamic list

Posted: Fri May 03, 2013 10:07 pm
by Rafael Martínez

The project has been shared. Thank you.


'value change' event for the toggle inside a dynamic list

Posted: Sat May 04, 2013 1:28 am
by maxkatz

I opened the app but not sure why it's not working. Going to look at it more.


'value change' event for the toggle inside a dynamic list

Posted: Sat May 04, 2013 9:24 am
by Rafael Martínez

You can use this project "TEST" for testing purpose.
We are working on another App.


'value change' event for the toggle inside a dynamic list

Posted: Sat May 04, 2013 12:40 pm
by Rafael Martínez

We have solved the problem by using a counter in this way:

  1. Set a local variable on service succes with the size of the array :
    localStorage.setItem('size',data.length);

  2. Set a local variable on "Value change" event for the list:
    n = parseInt(localStorage.getItem('count')) + 1;
    localStorage.setItem('count', n);

  3. Check the values on "Value change" event for the toggle:
    var s = parseInt(localStorage.getItem('size'));
    var c = localStorage.getItem('count');

    if (c s){
    alert ("Done !");
    }

    FInd it here:
    http://appery.io/app/view/42ec9b46-87...

    I hope this would help for other people.


'value change' event for the toggle inside a dynamic list

Posted: Sat May 04, 2013 9:55 pm
by maxkatz

The service when using Echo is still invoked in the same way. Instead of getting JSON response from a service, it uses the Echo response.

I'm going to look into this more.