Page 1 of 1
Opening new browser window
Posted: Tue Jul 25, 2006 7:13 pm
by paultfh
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.
Posted: Tue Jul 25, 2006 7:36 pm
by kbrown3074
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...
Posted: Tue Jul 25, 2006 7:37 pm
by paultfh
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.
Posted: Tue Jul 25, 2006 7:39 pm
by feyd
php can't open a new window.. that's client-side functionality.
Posted: Tue Jul 25, 2006 7:41 pm
by paultfh
How do I send my php variables to JS?
Posted: Tue Jul 25, 2006 7:45 pm
by paultfh
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>
Posted: Tue Jul 25, 2006 8:25 pm
by LiveFree
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>";
Posted: Tue Jul 25, 2006 8:27 pm
by paultfh
Oh of course. Just not thinking today, thank you.
Posted: Tue Jul 25, 2006 8:28 pm
by LiveFree