Centered Popup
Written by admin on December 26, 2008 – 7:16 am -You can customize the width, height, and scrollbars on or off for each window you open. Sweet!
Author: Eric King (eric_andrew_king@hotmail.com)
<!-- TWO STEPS TO INSTALL CENTERED POPUP:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<!-- Put the URL inside the link's href="..." section, then carefully -->
<!-- change 'name' to a name for your popup window. The last three -->
<!-- items represent the popup window width, height, and scrollbars. -->
<a href="http://www.yahoo.com/" onclick="NewWindow(this.href,'name','400','400','yes');return false;">Popup Yahoo.com</a>
<!-- Script Size: 1.12 KB -->
Tags: Navigation
Posted in Navigation |