Live vs online (using javascript)

I didn’t actually go through and test this but my first guess would be that the ajax call is asynchronously running and the loop keeps going before the request is done. By the time the request has been processed the nm variable has already moved on to a different frame.