Here's one way 
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Template</title>
<meta name='author' content='Author'>
<meta name='description' content='Description'>
<meta name='keywords' content='Keywords'>
<link rel='stylesheet' type='text/css' href=''>
<style type='text/css'>
.blue {
color: blue;
}
.red {
color: red;
}
</style>
<script type='text/javascript'>
window.onload = function()
{
initPopupLinks('popLink');
}
function initPopupLinks(popupClassName)
{
var lnks = document.links;
if (lnks) {
for (var i = 0; i < lnks.length; ++i) {
if (typeof lnks[i].className == 'string' && lnks[i].className.indexOf(popupClassName) != -1) {
lnks[i].onclick = popupLinkOnClick;
}
}
}
}
function popupLinkOnClick()
{
xWinOpen('http://cross-browser.com/');
}
var xChildWindow = null;
function xWinOpen(sUrl)
{
// Modify 'features' to suit your needs:
var features = "left=0,top=0,width=600,height=500,location=0,menubar=0," +
"resizable=1,scrollbars=1,status=0,toolbar=0";
if (xChildWindow && !xChildWindow.closed) {xChildWindow.location.href = sUrl;}
else {xChildWindow = window.open(sUrl, "myWinName", features);}
xChildWindow.focus();
return false;
}
</script>
</head>
<body>
<p>These links will get a popup:</p>
<p>
<a class='red popLink' href='http://www.opera.com/'>Opera</a>
|
<a class='blue popLink' href='http://www.mozilla.com/firefox/'>Firefox</a>
</p>
<p>These links will <b>not</b> get a popup:</p>
<p>
<a class='red' href='http://www.opera.com/'>Opera</a>
|
<a class='blue' href='http://www.mozilla.com/firefox/'>Firefox</a>
</p>
</body>
</html>
Bookmarks