popwin
authorx2000habouzit <x2000habouzit>
Mon, 26 Jan 2004 12:45:07 +0000 (12:45 +0000)
committerx2000habouzit <x2000habouzit>
Mon, 26 Jan 2004 12:45:07 +0000 (12:45 +0000)
htdocs/javascript/popwin.js.php [new file with mode: 0644]
templates/login.head.tpl

diff --git a/htdocs/javascript/popwin.js.php b/htdocs/javascript/popwin.js.php
new file mode 100644 (file)
index 0000000..174f1a6
--- /dev/null
@@ -0,0 +1,28 @@
+var popup=null;
+function popupWin(theURL,theSize) {
+    if (theURL.indexOf('?')==-1)
+        a = '?';
+    else
+        a = '&';
+    theURL += <?php echo (isset($_COOKIE[session_name()]) ? "\"\"" : "a +\"".SID."\"");?>;
+    window.open(theURL,'_blank',theSize);
+    window.name="main";
+    if(popup != null) {
+        popup.location=popupURL;
+        if(navigator.appName.substring(0,8)=="Netscape") {
+            popup.location=popupURL;
+            popup.opener=self;
+        }
+        if(navigator.appName=="Netscape" ) {
+            popup.window.focus();
+        }
+        self.name="main";
+    }
+}
+function popWin(theURL) {
+    popupWin(theURL,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=700,height=600');
+}
+function popWin2(theURL) {
+    popupWin(theURL,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=200,height=100');
+}
+function x() { return; }
index 70c1c69..d6db692 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: login.head.tpl,v 1.1 2004-01-26 12:36:32 x2000habouzit Exp $ *}
+{* $Id: login.head.tpl,v 1.2 2004-01-26 12:45:07 x2000habouzit Exp $ *}
 
 {literal}
     <style type="text/css" media="screen">
@@ -10,5 +10,6 @@
       -->
     </style>
 {/literal}
+    <script language="javascript" src="{"javascript/popwin.js.php"|url}" type="text/javascript"></script>
 
 {* vim:set et sw=2 sts=2 sws=2: *}