Applies when scripting is used to open new windows.
Some Web sites open a new window when a page is loaded, to advertise a product or service. The objective of this technique is to ensure that pages do not disorient users by opening up one or more new windows that automatically attain focus as soon as a page is loaded.
There are multiple methods by which this failure may be triggered. Two common examples that are supported differently in various versions of user agents are listed as examples below.
window.addEventListener("load", showAdvertisement, true);
window.attachEvent("onload", showAdvertisement);
function showAdvertisement(){
window.open('noscript.html', '_blank', 'height=200,width=150');
}