Re: Opening a new window?
| From: | Mike Mannakee | Date: | Mon, 14 Apr 2003 04:07:29 +0000 |
| Subject: | Re: Opening a new window? | ||
| References: | 1 | Groups: | php.general php.windows |
| Request: | Send a blank email to php-windows+get-19415@lists.php.net to get a copy of this message | ||
This really is a JavaScript topic, and I'll probably get bitched at for
responding, but here's some code you can use. Stick this between the header
tags in your html.
<script language="JavaScript">
<!--
function openwin(url)
{
var newwin = open(url, "newwin",
"height=575,width=500,innerHeight=575,innerWidth=500,outerHeight=575,outerWi
dth=500,screenX=150,left=150,screenY=150,top=150,channelmode=0,dependent=0,d
irectories=0,fullscreen=0,location=0,menubar=0,resizable=yes,scrollbars=1,st
atus=0,toolbar=0");
}
//-->
</script>
Then call is in your links like
<a href="JavaScript:" onClick="openwin('URL GOES HERE')">
You can change the size of the window and position by editing the values in
the string that is the 3rd argument in the function. Just don't add any
spaces in there.
Mike
"Odcs" <odcs@rogers.com> wrote in message
news:005e01c3022d$0026c2f0$6401a8c0@p1...
> I have a voting poll on my site. When the visitor votes I want a pop-up
> window to open to show the results. Is there a way I can do this from the
> same script. Everything I have read looks like a separate file needs to be
> called. In my script I am using $PHP_SELF in the form to update the votes
> and I just want to go from there to another function that will open a new
> window with the results.
>
> Thanks.
>
>