PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
paultfh
Forum Commoner
Posts: 31 Joined: Thu Jul 20, 2006 6:24 pm
Post
by paultfh » Tue Jul 25, 2006 7:13 pm
I was wondering what the php function is for opening up a new browser window.
Right now my code looks like this:
Code: Select all
header("Location: ../nzb/submitform.php?" .
"fileurl=" . $fileurl .
"&name=" . $name .
"&size=" . $sizeofallfiles .
"&numfiles=" . $numfiles .
"&date=" . $date .
"&group=" . $group);
What I want to do is open this in a new window.
kbrown3074
Forum Contributor
Posts: 119 Joined: Thu Jul 20, 2006 1:36 pm
Post
by kbrown3074 » Tue Jul 25, 2006 7:36 pm
Cant you just put it into a link? Whats the use of opening a new page? I would think using a javascript window.open would suffice...
paultfh
Forum Commoner
Posts: 31 Joined: Thu Jul 20, 2006 6:24 pm
Post
by paultfh » Tue Jul 25, 2006 7:37 pm
kbrown3074 wrote: Cant you just put it into a link? Whats the use of opening a new page? I would think using a javascript window.open would suffice...
I didn't think to use java script - I guess that will do it.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Jul 25, 2006 7:39 pm
php can't open a new window.. that's client-side functionality.
paultfh
Forum Commoner
Posts: 31 Joined: Thu Jul 20, 2006 6:24 pm
Post
by paultfh » Tue Jul 25, 2006 7:41 pm
How do I send my php variables to JS?
paultfh
Forum Commoner
Posts: 31 Joined: Thu Jul 20, 2006 6:24 pm
Post
by paultfh » Tue Jul 25, 2006 7:45 pm
For example:
Code: Select all
$myvariable
?>
<SCRIPT LANGUAGE="javascript">
<!--
window.open ('titlepage.html?$myvariable, 'newwindow', config='height=100,
width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,
location=no, directories=no, status=no')
-->
</SCRIPT>
LiveFree
Forum Contributor
Posts: 258 Joined: Tue Dec 06, 2005 5:34 pm
Location: W-Town
Post
by LiveFree » Tue Jul 25, 2006 8:25 pm
Code: Select all
$myvariable = "op=newwindow";
echo "
<SCRIPT LANGUAGE=\"javascript\">
<!--
window.open ('titlepage.html?".$myvariable."', 'newwindow', config='height=100,
width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,
location=no, directories=no, status=no')
-->
</SCRIPT>";
paultfh
Forum Commoner
Posts: 31 Joined: Thu Jul 20, 2006 6:24 pm
Post
by paultfh » Tue Jul 25, 2006 8:27 pm
Oh of course. Just not thinking today, thank you.
LiveFree
Forum Contributor
Posts: 258 Joined: Tue Dec 06, 2005 5:34 pm
Location: W-Town
Post
by LiveFree » Tue Jul 25, 2006 8:28 pm