Re: Javascript window.open problem

by "Jan Morell" <jan_man(at)bellsouth.net>

 Date:  Sat, 27 Oct 2001 07:06:59 -0400
 To:  <Reywob(at)aol.com>,
<hwg-languages(at)hwg.org>
 References:  aol
  todo: View Thread, Original
Hi Peter,

Give this a try.  It works in IE6 and NN6.  I am not sure about Opera.
Replace the URL with the one that you want.

<a href="javascript:ShowWindow();">Open your address book</a>
<script language=javascript>
function ShowWindow(){
var rndURL = (1000*Math.random());
var url = "http://www.mapledesign.co.uk/sendcard/sendcard.php";
h=300;
w=400;
newWindow =
window.open(url,'search','width='+w+',height='+h+',top='+(screen.height-h)/2
+',left='+(screen.width-w)/2+',location=0,directories=0,status=no,menuBar=no
,scrollBars=yes,resizable=yes');
newWindow.focus();
}
</script>

Jan Morell
CJHosting.com

----- Original Message -----
From: <Reywob(at)aol.com>
To: <hwg-languages(at)hwg.org>
Sent: Saturday, October 27, 2001 6:56 AM
Subject: Javascript window.open problem


Hi,

I have a problem with the folowing javascrpt.  The window opens to the
correct size in Opera and IE, but full-screen in NN 4.6.  What it the
matter?


<a href="javascript:;" onClick="window.open('addressbook/index.php',
'AddrBook', 'toolbar=no, location=no, status=yes, menubar=no,
scrollbars=yes,
resizable=yes, width=400, height=300')">Open your address book</a>

Or would you like to create an <a href="javascript:;"
onClick="window.open('addressbook/acc_create.php', 'AddrBook', 'toolbar=no,
location=no, status=yes, menubar=no, scrollbars=yes, resizable=yes,
width=400, height=300')">address book</a>?

You can see it in situ at http://www.mapledesign.co.uk/sendcard/sendcard.php

TIA,
Peter.

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA