I am using prototype  All I am trying to do is get the
results from evalJSON and iterate through them. I have an Ajax
request, and on success it does something like:


So far, nothing works.  Right now I am just doing some debug output.

First I tried:

        adjustResultsForMovement: function(newMarkers) {
                // add results not currently on map
                debugMessage(' -- adding -- ')
                for (var newLocId in newMarkers) {
                        if (typeof this.currentMarkers[newLocId] == 
'undefined') {
                                debugMessage('adding: '+newLocId+' - 
[newLocId].latitude+' '+ newMarkers[newLocId].longitude +

                // remove results no longer needed
                for (var existingLocId in this.currentMarkers) {
                        if (typeof newMarkers[existingLocId] == 'undefined') {
                                debugMessage('removing: '+existingLocId);

That iterates over all of the functions too, which I don't want.

Then I tried:

        adjustResultsForMovement: function(newMarkers) {
                newMarkers = $H(newMarkers);

                // add results not currently on map
                debugMessage('-- adding results --');

                var adder = function(newMarker, newLocId) {
                        debugMessage('add iterating: marker: '+newMarker+' 



Which still iterates over all of the functions in the Hash.

How am I supposed to iterate over just the data items in newMarkers?



You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to