I changed the raw for a custom server function:
Ape.registerCmd('leavePage', true, function(params, infos) {
Ape.log("Leaving Page");
});
Client side (I used Jquery) :
$(window).unload(function() {
console.log("Just left page");
ape.request.send('leavePage', {});
});
If I reload the page with Chrome, "Leaving Page" is addend to the APE logs, but
with Safari the log entry is not there.
- Louis
Le 2011-09-01 à 21:37, Wes Garland a écrit :
> Does the RAW actually get sent over the wire? Check with a packet sniffer if
> you're not sure.
>
> Wes
>
> On 1 September 2011 20:26, Louis Charette <[email protected]> wrote:
> False. They both fire, but it looks like it's the RAW I'm trying to
> send that is not working…
>
> On 1 sep, 20:04, Louis Charette <[email protected]> wrote:
> > I tried the "onbeforeunload" event. Looks like it's not working for
> > Chrome & Firefox. They both need "onunload", but this one doesn't work
> > on Safari (Didn't tried "onbeforeunload" on safari)
> >
> > It both doesn't fire when you simply close the page though… But I must
> > agree it's the simplest solution and better than nothing :)
> >
> > - Louis
> >
> > On 1 sep, 15:10, Pablo Tejada <[email protected]> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > This is simple to do in JavaScript, you could use the window
> > > onbeforeunload
> > > event to trigger the left command before the user either quits or
> > > navigates
> > > away from the webapp
>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" 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/ape-project?hl=en
> ---
> APE Project (Ajax Push Engine)
> Official website : http://www.ape-project.org/
> Git Hub : http://github.com/APE-Project/
>
>
>
> --
> Wesley W. Garland
> Director, Product Development
> PageMail, Inc.
> +1 613 542 2787 x 102
>
> --
> You received this message because you are subscribed to the Google
> Groups "APE Project" 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/ape-project?hl=en
> ---
> APE Project (Ajax Push Engine)
> Official website : http://www.ape-project.org/
> Git Hub : http://github.com/APE-Project/
--
You received this message because you are subscribed to the Google
Groups "APE Project" 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/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/