Page 1 of 1

Header() Resize?

Posted: Wed Jan 08, 2003 3:25 pm
by virgil
Hi Php's :)

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

Thanks Virgil :)

header - resize

Posted: Wed Jan 08, 2003 11:41 pm
by fractalvibes
Don't think you can, since that is really a client side function best handled
with Javascript.

Phil J.

Posted: Thu Jan 09, 2003 12:24 am
by mydimension
yep, deffinetly a client side issue and should be handled with JavaScript.

Posted: Thu Jan 09, 2003 8:34 pm
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.

Posted: Thu Jan 09, 2003 10:13 pm
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 ;)

Posted: Thu Jan 09, 2003 11:13 pm
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:

Posted: Thu Jan 09, 2003 11:27 pm
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