IntelliJ Java IDE
The moose likes HTML, CSS and JavaScript and the fly likes How to check the display screen size? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "How to check the display screen size?" Watch "How to check the display screen size?" New topic
Author

How to check the display screen size?

Anitha Aravind
Greenhorn

Joined: Jan 03, 2004
Posts: 19
Hello Everyone,
I am doing a web application for a PDA and I would like the application to be customized to any screen I display. I mean It should align the objects according to the screen size.
How do I do it in JSP? How do I check or get the display screen size.
Anitha
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50677

You don't. JSP has no way of knowing anything about screen sizes or other client-side information. You will need to perform some client-side operation to find out this kind of info. I do not know what the PDA client allows, but if it is Javascript-capable, you should be able to do this with some simple Javascript code. If not, then you need to find out what the PDA client can do for you in this regard.
I'll move this off to the HTML/Javascript forum for any further discussion.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 411
using JavaScript, you could use window.screen object.
Here is a description
 
 
subject: How to check the display screen size?
 
Threads others viewed
How to set a screen size
how to make a frame unexpandable?
setting screen size
How to handle different screen size
How to resize an application to screen size?
IntelliJ Java IDE