Sarah
Sarah

Reputation: 13051

How to grab window's size without use of JavaScript?

How to detect what's the window's dimensions are without using JavaScript?

Upvotes: 0

Views: 243

Answers (1)

Pointy
Pointy

Reputation: 413720

You have to use Javascript in order to get that information and arrange for it to be transmitted to the server somehow. There's no other way to do it. (I'm assuming that you mean you want to know the size of the browser window that's displaying some HTML, and you want the window size information to be available to your php code on the server.)

edit — TJ correctly points out that Flash or Java or some other, less pedestrian client-side technology could also get the window information. I assumed that if you're not willing to use Javascript, which would almost certainly be the easiest way to go, you wouldn't want to use anything else of the same sort, but that's definitely another option. The basic procedure would still be the same, however: send the page to the client, have the code gather the information you want, and the post it back somehow.

Upvotes: 1

Related Questions