By the way, I may be missing something, but in your case, why don't
you just use this.core.quit() on unbeforeunload?



On 2 sep, 21:25, Louis Charette <[email protected]> wrote:
> Yeah well I already tried this:
>
>         $(window).bind('beforeunload', function() {
>
> but I found the other one was working better, with Chrome at least.
> I just tried the raw js you quoted and it's not working either.
>
>   - Louis
>
> Le 2011-09-01 à 23:44, Pablo Tejada a écrit :
>
>
>
>
>
>
>
> > I knew about unload and safari, is why suggested the onbeforeunload event. 
> > Have not tried my self but I read it works. Try raw JS like
>
> > window.onbeforeunload = function(){
> >      //send left command
> >  }
>
> > Sent from my iPad
>
> > On Sep 1, 2011, at 10:41 PM, Louis Charette <[email protected]> 
> > wrote:
>
> >> 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/
>
> > --
> > 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/

Reply via email to