Her er noget jeg engang har brugt:
<html><head>
<script language="javascript" type="text/Javascript">
/*
Auto center window script- Eric King (
http://redrival.com/eak/index.shtml)
Lettere modificeret af nikolajdu fra eksperten.dk
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit
http://dynamicdrive.com*/
var win = null;
function NewWindow(mypage,myname,scroll){
w = 540;
h = 440;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
win.focus()
}
</script>
</head>
<body>
Brugte så en button til linket:
<input type="button" value="Vis billede3" onclick="NewWindow('installpics/apache3.gif','no');return false" onfocus="this.blur();">
</body></html>