From 35b1c81c55891e2acb202142c9ad9a135c3583e5 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Mon, 26 Jan 2004 12:45:07 +0000 Subject: [PATCH] popwin --- htdocs/javascript/popwin.js.php | 28 ++++++++++++++++++++++++++++ templates/login.head.tpl | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 htdocs/javascript/popwin.js.php diff --git a/htdocs/javascript/popwin.js.php b/htdocs/javascript/popwin.js.php new file mode 100644 index 0000000..174f1a6 --- /dev/null +++ b/htdocs/javascript/popwin.js.php @@ -0,0 +1,28 @@ +var popup=null; +function popupWin(theURL,theSize) { + if (theURL.indexOf('?')==-1) + a = '?'; + else + a = '&'; + theURL += ; + 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; } diff --git a/templates/login.head.tpl b/templates/login.head.tpl index 70c1c69..d6db692 100644 --- a/templates/login.head.tpl +++ b/templates/login.head.tpl @@ -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} {/literal} + {* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4