Solved

store screen resolution values in a variable

Posted on 2004-10-19
4
889 Views
Last Modified: 2008-03-17
How can I store the screen reolution ie the height and width in jsp (java) variables.
Thanks
0
Comment
Question by:monitorscreen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Assisted Solution

by:petmagdy
petmagdy earned 75 total points
ID: 12352968
Ok this is the solution, I assume u read the screen resolution using some client side script, if ur jsp called for example mypage.jsp, call in ur first web page that for example called index.jsp the client script used to read the screen resolution and then submit those values to an action or servlet as URL get or post parameters, and let that action or servlet store the values into the session so that be accessable to any page u want like mypage.jsp



0
 
LVL 2

Accepted Solution

by:
siliconeagle earned 125 total points
ID: 12356085
make a sniffer page with code similar to the following:-
<html>
<script>
function sniff() {
var hgt=window.screen.availHeight;
var wid=window.screen.availWidth;
document.location="<your_JSPor_servlet>?wid="+wid+"&hgt="+hgt;
}
</script>
<body onload="sniff()">
...
</body>
</html>
then get the parameters wid & hgt from your JSP using request.getParameter().
0
 
LVL 2

Expert Comment

by:siliconeagle
ID: 12481676
did this help? havent heard anything in a while.
0
 

Author Comment

by:monitorscreen
ID: 13044501
Sorry about the delay, that did work, thanks very much :)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question