Hi,
I am having difficulty saving information loaded from a contacts_load service. I am able to get the names and phone numbers of my contacts loaded into a list. However, when I try to save the information from these labels, only the default values seem to get stored, and not the information loaded from the contacts_load service. The order of operations are:
Run contacts_load when the page loads
Upon "success" of contacts_load, run some JS to store the needed labels (screenshot below)
I have some alert() commands set up to check the values of the labels, and they seem to be the default "name" and "number" values, as opposed to the actual values loaded. I have tried testing with xcode, and it appears that the contacts_load service is running properly (screenshot below).
Is this because the "success" JS is running before the contacts_load service has finished loading? Shouldn't the "success" JS be running AFTER the contact information has been loaded?
Thanks so much for your help!