()
| 207 | * Attach window on-load listener |
| 208 | */ |
| 209 | var attachWindowUnload = function() { |
| 210 | window.onbeforeunload = function() { |
| 211 | return "Are you sure you want to navigate away?"; //Keep the page from closing |
| 212 | }; |
| 213 | }; |
| 214 | |
| 215 | /** |
| 216 | * Remove window on-load listener |