Re: how to pass value from popup window to php program
| From: | Richard Crawford | Date: | Wed, 06 Feb 2002 17:42:21 +0000 |
| Subject: | Re: how to pass value from popup window to php program | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83731@lists.php.net to get a copy of this message | ||
There is no way of passing a variable from JS to PHP without sending
something back to the server or using a cookie.
I haven't followed the thread at all, but if I needed to pass a value
from a pop-up window to a PHP program, I'd probably do something like
this:
In the pop-up window, once the form's "submit" button is clicked or a
"Click here" link is clicked, the page calls the PHP program. The PHP
program processes the variable (sticking the value in the database,
whatever), then outputs a bit of HTML/JS just to close the window.
Note that absolutely NOTHING will happen if the user closes the window
by clicking the "close" widget on the window itself.
On Wed, 2002-02-06 at 09:36, Erik Price wrote:
>
> On Wednesday, February 6, 2002, at 12:26 PM, bvr wrote:
>
> >
> > Storing variables on the client-side using JavaScript
> > can be done by setting a cookie.
> >
> > The cookie data will ofcourse be available to PHP when
> > the next script is executed (for example through a link or redirect).
> >
>
> Ahh... is this the standard procedure for passing variables form JS to
> PHP? Is there a way that will work on browsers with cookies disabled?
>
>
> Erik
>
>
>
> ----
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> pricee@hhbrown.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Sliante,
Richard S. Crawford
mailto:rscrawford@mossroot.com http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford
MSN: underpope@hotmail.com
"It is only with the heart that we see rightly; what is essential is
invisible to the eye." --Antoine de Saint Exupery
"Push the button, Max!"