Forum Moderators: phranque
1) For the .js file or the HEAD section
function cPop(url, wide, high) {window.open(url,"popup",'width=' + wide + ',height=' + high);
}
2) Link code for the body:
<a href="javascript:cPop('pagename.html',www,hhh)">Link</a>
You will have to paste them into the actual source, how you do that in frontpage I am not sure but they must have some kind of source view mode.
There are tons of pop-up and pop-under scripts on the net - Google will reveal plenty of free scripts.
Try
[google.com...]
and
[google.com...]
oilman -
Are you serious? It took a hacking competition to come up with window.open()?
--------JavaScript Part--------
function MM_openBrWindow(theURL,winName,features) { //v2.0
new_width = features.substring(features.indexOf("width=")+6,features.indexOf("width=")+9) * 1
new_height = features.substring(features.indexOf("height=")+7,features.indexOf("height=")+10) * 1
var left = Math.floor( (screen.width - new_width) / 2);
var top = Math.floor( (screen.height - new_height) / 2)
var winParms = "top=" + top + ",left=" + left
if (features) { winParms += "," + features; }
window.open(theURL, winName, winParms);
}
--------Link Part--------
<A href="javascript:;" onclick="MM_openBrWindow('http://www.#.com','winname','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=555,height=555')">link_name</a>
var win= null;
function NewWindow(mypage,myname,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no'
win=window.open(mypage,myname,settings)
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
And a simpler link:
<a href="javascript:NewWindow('page_name.html','popup','400','300','no')">Link_Name</a>
Adjust width and height as desired.
Note: This linking method will prohibit robots from finding the pop-up,
which is the way I like it. However, if you wish the pop-up crawled, do
a site-search for Tedster's vanillia link.