Join us and the lead editor of IRL, Mozilla's multi-award-winning podcast, for a behind-the-scenes look at the pod and to contribute your ideas for the next season, themed: "AI and ME." Mark your calendar and join our Community Call on Wednesday, Aug 7, 17:00–17:45 UTC. See you there!

Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Mësoni Më Tepër

window.onbeforeunload is not working in firefox latest version

  • 2 përgjigje
  • 33 e kanë hasur këtë problem
  • 9 parje
  • Përgjigjja më e re nga BalajiPolisetty7

more options

Javascript window.onbeforeunload event has a function and at the end we have alert . in Previous version of firefox we used to get alert after executing that function . But in the latest version of firefox we are not getting . Can you please provide in which this will be resolved. or please provide the work around .. thanks alot.

Javascript window.onbeforeunload event has a function and at the end we have alert . in Previous version of firefox we used to get alert after executing that function . But in the latest version of firefox we are not getting . Can you please provide in which this will be resolved. or please provide the work around .. thanks alot.

Krejt Përgjigjet (2)

more options

hello BalajiPolisetty7, it is the intended behaviour that alert() isn't allowed in onbeforeunload. many rogue sites use that to trap and scam users when they want to leave a page...

more options

Thanks for your timely reply . i need to call few java script functions on close of browser tab / window just want to know what is the in built javascript/ jquery functions that i need to use because older version of firefox used to support the window.onbeforeunload so last statement of the event we placed alert so everything got executed and alert box will come . Now with the current version without executing all the statements in the event browser is getting closed.

Please do the needful thanks alot