Thanks to everyone for their help.

In the end, the following code sufficed for my needs:

var uid = function()
        var id = 0;

        return function()
                return id ++;

        onCreate: function(request)
                request.uid = uid();

This made the UID available through request.uid, and additionally the
response object contains a reference to the original request object
also, so you can use response.request.uid to retrieve the same value.

On Sep 24, 12:43 pm, emwebdev <[EMAIL PROTECTED]> wrote:
> Hi there
> I need a way to uniquely identify a particular AJAX request / response
> cycle through some kind of shared unique ID or similar.
> The reason for this is that I have an AJAX "status" display on a page
> which keeps a history of AJAX requests and their success / failure
> results, but at the moment I am assuming that so long as the URL is
> the same, then the response must be related. This works OK, but if
> there are two AJAX requests to the same URL everything goes out the
> window.
> I thought it must be possible to extend the Prototype Ajax object
> somehow to achieve this, but I'm having no luck.
> Can anyone suggest the best way to make this work?
> Cheers,
> Erin
You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to