-
SitePoint Zealot

Set a php variable according to a javascript condiitional
Hello all, I'm new to php and javascript and what not... but hopefully there is someone out there that has an answer.
With jquery I detect screen resolution. I set a conditional : if screen is bigger than... and smaller than... then...
Now if that conditional is given I want to set a php variable. How?
Any guidance would be greatly appreciated.
Andres
-
php runs on the server, js runs on the client, so in general you can't
-
SitePoint Zealot

So say you need to detect the resolution of a browser and according to that you need to load one image or another. How would you go about it?
-
Load a default image (or placeholder, possibly hidden) and have JS replace it when it works out the screen size.
-
SitePoint Zealot

Thank you i'll look into it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks