OnLoad Popup

The classic auto-launcher. This script attempts to open a new window immediately when the page loads. Note: Most modern browsers will block this by default unless the user has permitted popups for your domain.

Copy the Script

<script>
// Simple OnLoad Popup
window.onload = function() {
    window.open('https://www.google.com', 'newWin', 'width=400,height=300');
}
</script>

<!-- OR via Body Tag -->
<body onload="window.open('page.html')">

Frequently Asked Questions

Modern browsers block 'window.open' calls that happen automatically during page load (OnLoad) to prevent spam. This script works best for internal intranet tools or trusted sites where users have whitelisted popups.

The only reliable workaround is to bind the popup to a user action (like a click) instead of the OnLoad event. See our 'Button Click Alert' script.