• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I Dynamically change Applet size.

 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want to display applet whose size will vary depending on screen resolution used by the comupter.
Does any body tell me how I can get Screen resolution from JavaScript. so that I can change my applet display size.
thanks in advance
Mohana
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

well, the best you could do is specify the WIDTH and HEIGHT
in terms of % and not just an int value. Then again it will
be % of the browser WIDTH and HEIGHT.
Also, I have read that its not a very good practice to set
these for the applet.
For what its worth.
- satya
 
Rakesh Ray
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<html>
<body>
<script type="text/javascript">
document.write("SCREEN RESOLUTION: ")
document.write(screen.width + "*")
document.write(screen.height + "<br>")
document.write("AVAILABLE VIEW AREA: ")
document.write(window.screen.availWidth + "*")
document.write(window.screen.availHeight + "<br>")
document.write("COLOR DEPTH: ")
document.write(window.screen.colorDepth + "<br>")
</script>
</body>
</html>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic