Don't see why not though it'd slow down the user experience a bit (not
necessarily a good thing).

Have the onclick block, send data to server, server responds, then in
the Ajax callback send user to the destination via window.location

Note: I haven't done this, it's just an off the top of my head
suggestion.

Sent from my phone so please pardon any spelling errors.

On Feb 15, 2010, at 8:28 PM, manfmnantucket <[email protected]>
wrote:

> Hi all,
>
> I'm trying to use Prototype to do asynchronous click-tracking... that
> is, to
> log a server record each time a user clicks a link to navigate to
> another page.
>
> I've set the link onclick up to call a simple function which makes an
> Ajax.Request to send the data
> without blocking.
>
> However usually the server never gets the data, I think because the
> current page Unloads before
> Request can complete.
>
> What's the correct way to accomplish this? Is there a way to make page
> Unload wait until the
> Request is sent (but not until the server responds)??
>
> thanks!
>
> --
> 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 [email protected]
> .
> To unsubscribe from this group, send email to 
> [email protected]
> .
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en
> .
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to