internet explorer - jQuery bind beforeunload - not working with IE 9 -
i have piece of code want fired when page closes (basically, send 'disconnected' message server. execution should fast enough me not have cancel , restart event. further that, works in chrome, firefox , safari, not in ie9 on closing tab. if navigate page in ie9, event fires. if close tab, doesn't. tried following bind code:
jquery(window).bind("beforeunload", function() { dosomework(); });
i tried replacing jquery $ so:
$(window).bind("beforeunload", function() { dosomework(); });
still works in chrome, not work in ie. suggestions?
i using jquery 1.9.1 min (compressed production version).
try this
onbeforeunload = function() { return "are sure"; }
tested in chrome version 26.0.1410.64 m
firefox version 20.0.1
internet explorer version 9.0
Comments
Post a Comment