window size problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
If I call my PHP script by submitting a form like this -

<form id="coordinates" name="coords" method="post"

The script works fine but the PHP page replaces the html page and
takes up the whole screen. I would like the PHP script to take up a
smaller, separate  window. I have tried using in
javascript but I get the smaller window but the PHP code doesn't
execute properly in the smaller window.

How can I make the PHP script execute in a new, smaller window?

I would be grateful for any help, If this is the wrong newsgroup for
this post I apologize and request that someone points me towards the
right group.

Thanks in advance, Steve.

Re: window size problem

Steve wrote:
Quoted text here. Click to load it

PHP does not do any of this, PHP only sends data (via echo/print etc...)
to the client and the client "paints" the window according to how you
created your style sheet and or hard-coded tables, columns, divisions
etc...  This is an HTML issue, not a PHP issue.

Re: window size problem

Steve wrote:
Quoted text here. Click to load it

This is a html thing read

You most likely can to use JavaScript to make the form post to a new
window as well.

I suggest you ask a JavaScript  and HTML newsgroups if you need further

regards trookat

Re: window size problem

Steve wrote:

Quoted text here. Click to load it

As Michael Austin said, you can't.

You should try out a text-based browser (links2, w3m, elinks) - that will
clear your mind. It's a little bit of zen - if the client isn't using a
browser in a window, how can you resize the client's browser window?

Iván Sánchez Ortega -ivan-algarroba-sanchezortega-punto-es-

Un ordenador no es un televisor ni un microondas, es una herramienta

Re: window size problem

Steve wrote:
Quoted text here. Click to load it

Chances are because it is not an actual Submit, your form variables are
not being passed correctly.

When I do this I either set cookies before doing a, or set
GET variables in an URL..

I,e here I pass an ID to a subwindow using a get variable

<script>"stockedit.php?nobanner=yes&id="+id, "_blank",

And here a cookie is set to pass to the new code. This function picks up
the value from a form variable called 'customer' and passes it as cookie
'cid' to URL specified in $locale_secure_server/cd.php

function sub_window(url)
    var cid=document.getElementsByName('customer')[0].value;
    document.cookie="cid="+cid +"; version=0; path=/";"<?echo $locale_secure_server;?>/cd.php","Card","width=480,
top=200, left=260, height=200, resizable=yes");

Quoted text here. Click to load it
Well since the solution is essentially a javascript one, as you rightly
surmised, the javascript place is better to discuss it.

Oh you can read URL embedded GET variables using $_GET array, and read
cookies using $_COOKIE array.

Quoted text here. Click to load it

Re: window size problem

You could submit the form using AJAX instead of a form.  Then you'd
simply open a new window in the callback function and write out the
AJAX data directly to it.

Another method would be to open a new window, with the URL being a
javascript file with just one function in it that you could then call
and pass the form data to it.  The new window's function would then
recreate and submit the form, loading the PHP page into the new

Tyler Style

Steve wrote:
Quoted text here. Click to load it

Site Timeline