Forum: Ruby on Rails AJAX status update to application just before a external sit

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Greg H. (Guest)
on 2007-02-13 03:07
(Received via mailing list)
Hi,

I'm incorporating a Palpal donate button on my site, however I'd like to
be
able to send an update (AJAX) to my application to alert it to the fact
that
the user has clicked on donate, and hence would be in the process of
being
taken to the PayPal site.

Is there a way to wrap an AJAX update back to my application around an
external site's link that I embed.

Tks
Greg
Sheldon H. (Guest)
on 2007-02-13 11:09
(Received via mailing list)
On Feb 13, 3:06 am, "Greg H." <removed_email_address@domain.invalid>
wrote:
> Is there a way to wrap an AJAX update back to my application around an
> external site's link that I embed.

Take a look at how any popular web analytics package handles the
tracking of outclicks.  For example:

    http://s10.sitemeter.com/js/counter.asp     (Note: Copyright)

Basically, you add an onclick event handler to every link in the
document by iterating over document.links.

Ciao,
Sheldon.
Greg H. (Guest)
on 2007-02-13 11:40
(Received via mailing list)
thanks Sheldon - you don't happen to know whether prototype or
scriptaculus
have this type of feature inbuilt somewhere?
Greg
Sheldon H. (Guest)
on 2007-02-13 12:09
(Received via mailing list)
On Feb 13, 11:40 am, "Greg H." <removed_email_address@domain.invalid>
wrote:
> thanks Sheldon - you don't happen to know whether prototype or scriptaculus
> have this type of feature inbuilt somewhere?

Well they both support iterating over document elements (although
iterating over document.links is easy enough), and from there I'd
imagine it's just the usual remote post handling.


Ciao,
Sheldon.
This topic is locked and can not be replied to.