I wrote this long ago, and it still works for me:
Code: Select all
function OpenSubWin( page, w, h, sb )
{ var sw = screen.width, sh = screen.height;
var ulx = ((sw-w)/2), uly = ((sh-h)/2);
var sbt = (sb==1) ? 'yes' : 'no';
var paramz = 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars='+sbt+',width='+w+',height='+h+'';
var oSubWin = window.open( "e;"e;, "e;SubWin"e;, paramz );
// To be certain size changes:
oSubWin.resizeTo( w, h );
oSubWin.moveTo( ulx, uly );
oSubWin.location.replace( page );
}
So you could make your link like:
Code: Select all
// With Status Bar:
<a href="e;javascript:OpenSubWin('inc/bigpic.php?pic=<?php echo $rowї"e;itemPic"e;]; ?>', 100,100,1);"e;>
// Without Status Bar:
<a href="e;javascript:OpenSubWin('inc/bigpic.php?pic=<?php echo $rowї"e;itemPic"e;]; ?>', 100,100,0);"e;>
And it will even center the pop up window (or at least it should).. I hope that helps!