Header() Resize?

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

Post Reply
virgil
Forum Commoner
Posts: 59
Joined: Thu Jun 13, 2002 11:43 pm
Location: New York, U.S.

Header() Resize?

Post by virgil »

Hi Php's :)

Does anyone know a way to resize the new window when using the ...
header(location: ""); function?

Thanks Virgil :)
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

header - resize

Post by fractalvibes »

Don't think you can, since that is really a client side function best handled
with Javascript.

Phil J.
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

yep, deffinetly a client side issue and should be handled with JavaScript.
virgil
Forum Commoner
Posts: 59
Joined: Thu Jun 13, 2002 11:43 pm
Location: New York, U.S.

Post by virgil »

Hi Php's

This window crap is the only basic thing you cant do with PHP and I dont want to learn all the ins and out of JS just for this one thing. I really tried not to use JS in my whole site because there seem to be so many JS error popups on the web. I want to stick to just PHP if possible. But you cant. Sorry for the vent....


This is here as a cut -n- paste for the newbees....

It allows a new smaller window so exterenal links dont take someone away from your site......

Put this conditional after the body tag...

Code: Select all

<? if ($x=="y")&#123;?>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
window.open('http://www.whatever.com', '_blank', 'height=320,innerHeight=320,width=400,innerWidth=400,scrollbars,resizable');
&#125; //--> </SCRIPT>
<?&#125;?>
or....

Code: Select all

<a href='www.whatever.com' onclick="window.open('http://www.whatever.com', '_blank', 'height=320,innerHeight=320,width=400,innerWidth=400,scrollbars,resizable')"> link </a>
or...

Code: Select all

<input type="button" onclick="window.open('http://www.whatever.com', '_blank', 'height=320,innerHeight=320,width=400,innerWidth=400,scrollbars,resizable')" value="Button" name="whatever" >


Hope this helps someone :)


PS Maybe Jason could make a quick sticky with some cut and pastes of the stuff PHP cant do.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

it's not PHP can't do it's no one on the remote side can
there is simply neither specification nor implementation for this in common protocols/browsers ;)
virgil
Forum Commoner
Posts: 59
Joined: Thu Jun 13, 2002 11:43 pm
Location: New York, U.S.

Post by virgil »

Server side....Client side.... bla...bla...bla...

Next thing you'll be telling me is that computers arent really magic and there isnt a genie painting the back side of my moniter!


Thanks from a white dwarf....you know....dense....


When you stop learning, you die. Looks like Im gonna be around for a while. :roll:
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

sorry, no magic in your computer. But in fact there is a genie painting the images in your monitor. The pc is just a distraction :D
Post Reply