1

Anyone can you please help to work this issue. I have tried many solution for it. I want to fire event when browser close. I tried below codes for solutions but every solutions only work in desktop.

            window.onbeforeunload = function () {
                    if (imgArray.length != 0)
                        pms_image_clock.addimglog(true);
                };

            window.pagehide = function () {
                if (imgArray.length != 0)
                    pms_image_clock.addimglog(true);
            };

Also tried below

jQuery(window).bind('beforeunload pagehide onunload', function(e) {
           if (imgArray.length != 0)
                        pms_image_clock.addimglog(true);
});

And this also

window.onunload = window.pagehide = window.onbeforeunload = function() {
             if (imgArray.length != 0)
                    pms_image_clock.addimglog(true);
}

Anyone have solution that browser close event work in mobile/ipad browser. Please let me know.

Thanks in advance.

Andrew Nolan
  • 1,987
  • 2
  • 20
  • 23
Jalpa
  • 697
  • 3
  • 13

0 Answers0