NYCPHP Meetup

NYPHP.org

[nycphp-talk] Opening windows & such

Daniel Kushner nyphp at websapp.com
Mon Aug 5 15:16:25 EDT 2002


In the main window:
<script language="JavaScript">
	function newWindow(file) {
		msgWindow=open(file, 'new'
,'resizable=no,width=500,height=600,scrollbars=yes');
    		if (msgWindow.opener == null) {
    			msgWindow.opener = self;
    		}
	}
</script>

In the opened window:
<script language="javascript">
	opener.location.reload();
	window.close();
</script>

Regards,
Daniel Kushner
daniel at websapp.com
______________________________________________
Need hosting? http://www.thehostingcompany.us/


> -----Original Message-----
> From: Nunez, Eddy [mailto:enunez at tiaa-cref.org]
> Sent: Monday, August 05, 2002 3:01 PM
> To: NYPHP Talk
> Subject: [nycphp-talk] Opening windows & such
>
>
>
> Hiya folks...
> Need a little help with Javascript...
>
> My problem is .... I need to close the current window and change the
> 'location' of it's parent window.
> I was trying to do something like this, but obviously it doesn't work:
>
> <?php
> $ref = getenv('HTTP_REFERER');
> echo "<script> NewWindow('$login_page?ref=$ref','login',300,200,false);
> </script>";
> ?>
>
> Within the login.page, after a successful login I want it to close itself
> and reload the $ref
> in the parent window:
>
> <script> parent.location='$ref'; window.close(); </script>
>
> Any JS experts wanna toss me a clue?   Thanks.
>
> -Eddy
>
>
> **********************************************************************
> This message, including any attachments, contains confidential
> information intended for a specific individual and purpose, and
> is protected by law.  If you are not the intended recipient,
> please contact sender immediately by reply e-mail and destroy all
> copies.  You are hereby notified that any disclosure, copying, or
> distribution of this message, or the taking of any action based
> on it, is strictly prohibited.
> TIAA-CREF
> **********************************************************************
>
>




More information about the talk mailing list