Popup Windows: Opening AutomaticallyIn the first two examples (Popup Windows: The Basics and Popup Windows: From an Image Map) the popup is opened when the user clicks on something. In this example the popup opens automatically.
We'll use the same script as in the first example. Copy this script in the
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
//-->
</SCRIPT>
This time, instead of running the script from a link we'll run it from the
<BODY onLoad="popup('autopopup.html', 'ad')">
The command in |