Click here to Skip to main content
14,336,465 members
Rate this:
Please Sign up or sign in to vote.
See more:
Good Morning to all i want to give conformation alert in browser close button click event i am using the following code


window.onbeforeunload = function () {
                return '';
        }


But the above code Give the alert at all button clickevent so i modified the code as follows


window.onbeforeunload = function () {
            if (Browseraction != "search") {
                return '';
            }
        }

i declare variable Browseraction as a global variable in all bages button click event now the problem is solved.It is worked fine in GoogleChrome,Firefox,Ie7,Ie8, but not work in ie6 how can i solve it ie6 please anyone help me




thanks in advance
By
Meganathan M
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100