I am using this code to create a small window after clicking on a hyper link, but there is error.
error: the new small window opens but the back big window goes one step back;
I have spent alot of my time to find the solution but in vain.
kindly inform me if any one know.
Thank you.
COde:
<? if(file_exists("images/p1/".$update_id.".jpg")){$path="images/p1/".$update_id.".jpg";?><a href=" " onClick="return popupp('photo.php?path=<?=$path;?>');">Picture 1:</a><? }else print("Picture 1:");?>
///////////////////////java script//////////////////////////
<script language="javascript">
function popupp(url)
{
popUpWindowPicture(url,"Athar",400,600);
}
</script>
<script language="javascript">
function popUpWindowPicture(uri,winname,winheight,winwidth) {

if (document.all){
var xMax = screen.width, yMax = screen.height;
}
else{
if (document.layers){
var xMax = window.outerWidth, yMax = window.outerHeight;
}
else{
var xMax = 800, yMax=600;
}
}
if (xMax<=800){
var xAdd=0,ySub=0;
var xOffset = 0, yOffset = (yMax-ySub)/6;
}
else{
var xAdd=0,ySub=0;
var xOffset = 0, yOffset = (yMax-ySub)/3;
}
mywin=window.open(uri,winname,'height='+winheight+ ',width='+winwidth+',screenX='+xOffset+',screenY=' +yOffset+',top='+yOffset+',left='+xOffset+',locati on=0,menubar=0,statusbar=0,locationbar=0,scrollbar s=1,resizable=1');
mywin.focus();
}
</script>