PDA

View Full Version : Handling the so onSync event


kalel
07-05-2005, 01:15 AM
mySharedobject.onSync = function(myList) {

for ( var i in mySharedobject.data ) {
if ( mySharedobject.data[i] != null ) {

///clear current list

///create item in list


}
}


So pretty much I have a function being performed when the shared object changes x amount of times as I have items in mySharedobject.

But I don't want to clear the whole list and recreate it.......how can I take the the list object and compare it with what is on the client side and only remove or add the item.
So the list doesnt go blank while its updated but only the item that is added or removed be changed.

I hope I have explained my self right.

Thanks

kalel
07-05-2005, 01:30 AM
hmmmm I was thinkin do I have to play around with the for loop add a condition?

Amn
07-13-2005, 02:07 PM
Describe what is it you want to do ;)

theflash
08-11-2005, 01:48 PM
yesh you can do it... you will have to use the properties below....

myList[i].name : name of slot that changed
myList[i].code : "new", "change" , "delete"
myList[i].oldValue