Skip navigation

Currently Being Moderated

Suppressing JavaScript alerts

Mar 26, 2012 8:30 PM

Use the following code with caution and be mindful where you place it, because it will supress any alert windows. For example, if you place it on a site-wide template, it will supress any alert pop-up window, which may impact the features of your site.

 

<script type="text/javascript">
window.alert=function(msg){}
</script>

 

If you want to get rid off alert popups and still keep the message and display them inside the page body, you can take a look at this article.

 
Comments (16)