Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 24th, 2006, 05:56 AM
Authorized User
 
Join Date: Jan 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default "new window error"

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>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help to indicate Window Handle Error ponn_arun C# 1 May 27th, 2007 11:34 PM
'window.opener.document' error in IE Colleen Javascript How-To 1 July 25th, 2006 07:57 PM
Error creating window handle sarahmapg ADO.NET 1 January 18th, 2006 06:30 AM
Error creating window handle Bob Bedell Pro VB.NET 2002/2003 2 July 30th, 2004 09:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.