![]() |
| ||
| close event for firefox Hi guys, i'm new to JS and need a little help on this issue of mine..... i'm trying to popup a confirm dialog box whenever i close my browser window,the problem is that i'm able to do this in IE but i'm having problems when i'm using firefox.i'm doing this using the "onbeforeunload" event......... Please do gimme a solution to this problem in forefox and also let me know y this is happening................. The script that i've ritten is : [html] <script language="JavaScript"> function ConfirmLeaving() { if (event.clientY < 0 && event.clientX > 600) { var answer = confirm ("do u want to go to google?"); if (answer) { window.open("http://www.google.com"); } } } </script> </HEAD> <body onbeforeunload="ConfirmLeaving();">[/html] |
| ||
| Re: close event for firefox Hi fuehrer, if you check this code using firefox in Javascript Console,you'll figure out that it throws this error: Quote:
Good luck. |
| All times are GMT -4. The time now is 4:16 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC