Don't like it 'cause it is client-side, but it works fine!
...Fredrik:)
"Elias" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Well, Yes...
> you have to stick to JavaScript + JavaScript and not JavaScript + PHP!
> You can let PHP talk w/ JavaScript and not t
Well, Yes...
you have to stick to JavaScript + JavaScript and not JavaScript + PHP!
You can let PHP talk w/ JavaScript and not the reverse!
if (screen.width >= 1024) {
var resolution = "1024";
} else {
var resolution = "800";
}
document.write(resolution);
btw, why don't
all this is happening on the server. on the server $resolution is just a
string so "if ($resolution >= '1024')" compares the two strings (using ascii
values) and finds that "<"(60) is greater than "1"(49). If you want the
server to know the screen width of the client you'll need to dig into the
he
This fixed it, but I don't like it! If you have any other suggestions, feel
free to email me.
if (screen.width >= 1024) {
var resolution = ("1024")
} else {
var resolution = ("800")
}
Best Regards
Fredrik A. Takle
"Fredrik A
--
PHP General Mailing List (http://www.php.net/)
4 matches
Mail list logo