View Single Post
Old 06-16-2003, 01:58 PM   #6 (permalink)
crazycousinjim
Crazy
 
Location: Copenhagen, Denmark
Check this out. It is a little more complex, but it alllows for a lot more flexibility.

PHP Code:
<html>
<
head>
<
title>PopUp For BoCo</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<
script language="JavaScript">
    function 
doPopUpurlStrnameopts )
    {
        
window.openurlStrnameopts );
    }
</script>
</head>

<body>
    <p>
        <a href="#" onClick="doPopUp( 'http://www.google.com', 'awindow', 'toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=400px,height=300px,left=50,top=50,screenX=50,screenY=50')">
            Click here to open Google
        </a>
    </p>
        <a href="http://www.tfproject.org" target="awindow">
            Click here next to change to TFP
        </a>
</body>
</html> 
The JS function opens up a new window with the first parameter being the url, the second being the name you can use to target the window in the future. The last parameter if for the traits you want the window to have. Most of them are pretty self explanatory, just make sure screenX and screenY are the same as left and top respectively. Oh yeah, no spaces in the options string. If you want more than that I would more than happy to expand. Sorry about the crappy formatting, php formatting sems the only one that will work right

Last edited by crazycousinjim; 06-16-2003 at 02:07 PM..
crazycousinjim is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73