Hi,
While closing the browser, I'm getting the Windows generated alert. I want my alert message to be displayed overriding the windows alert. Can I please know how to override the WINDOWS ALERT ? thx... ur help appreciated..
If the window is opened through a script, you will not get the alert when you close the window. To put your own custom alert in, you can call a function in the onClick of your hyperlink that closes the window and put in:
if (confirm('Are you sure you want to close this window')){
window.close
}
this question is repeatedly asked and answered along with some strong opinions to why to and why not to do it. Try doing a search of Tek=Tips to find the solution. ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.