are not actually passing anything from JavaScript to PHP... you are just
tricking yourself =)
Sheridan
- Original Message -
From: Morten Winkler Jørgensen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 17, 2001 4:54 AM
Subject: Re: [PHP] Output (Urgent!)
This discussion reflects a surprisingly common misunderstanding of client v.
server side scripting. PHP, all processing takes place on the server.
Javascript, all processing takes place on the client. I've seen this
misconception with ASP v. VBscript/javascript too.
Strange you would think
How do you know it worked? :)
> -Original Message-
> From: Morten Winkler Jørgensen [mailto:[EMAIL PROTECTED]]
> Sent: 17 iulie 2001 12:54
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Output (Urgent!)
>
>
>
> >> How you want to get a value from clien
>> How you want to get a value from client side to php on the same page?
Well. Actually I didn't invent the code. I just correcteded it so it
worked on my installation. I must admit I was amazed that it somehow
worked, but it did.
Kind regards,
Morten Winkler
--
PHP General Mailing Lis
How you want to get a value from client side to php on the same page?
Joseph
"Orv î?÷inklÏ ²ørÏkîskî" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Frederik
>
> Run this code. It does what you want it to.
> In your original code you compared two strings
> $resolution = " LANGUAGE=\"JavaScript\">document.write(screen.width)";
>
> if ($resolution >= '1024') {
> $resolution = "1024";
> } else {
> $resolution = "800";
> }
> echo $resolution;
>
> It always output 1024
At a guess becasue your mixing and matching languages.
If you g
: Morten Winkler Jørgensen [mailto:[EMAIL PROTECTED]]
> Sent: 17 iulie 2001 12:14
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Output (Urgent!)
>
>
> Hi Frederik
>
> Run this code. It does what you want it to.
> In your original code you compared two strings in the IF-stateme
Hi Frederik
Run this code. It does what you want it to.
In your original code you compared two strings in the IF-statement.
When the $resolution gotten from your JavaScript returned '800' it would
have a lexical higher value than '1024' and thereby do exacely what
you wanted it to - actually the
Why doesn't this work? Any ideas?!
$resolution = "document.write(screen.width)";
if ($resolution >= '1024') {
$resolution = "1024";
} else {
$resolution = "800";
}
echo $resolution;
It always output 1024
Best regards
Fredrik A. Takle
Bergen, Norway
--
PHP General Mailing Li
9 matches
Mail list logo