Set applet's width to browser's width

The width of an applet is set via the "width" attribute of the applet tag, which is specified in pixels. I would like the width of the applet to be dynamic, such that it will take up the entire width of the browser's window. When the browser is resized, the applet will resize accordingly. Can this be achived? Thanks.
integrosysAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
try width 100%
0
 
CEHJCommented:
You'd need to use JavaScript for that
0
 
CEHJCommented:
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
integrosysAuthor Commented:
>> try width 100%

Isn't width specified in pixels?
0
 
objectsCommented:
can be either
0
 
ForceRsCommented:
objects is correct (width and height can be %).

To have mozilla browsers honor this, you must reload the page onResize:

<html>
<head>
<script language="JavaScript">
function resizer() {
      if(navigator.appName == 'Netscape') {
            history.go(0);
      } // end if
}
</script>
</head>

<body onResize="resizer();">
Your page's visual content.
</body>
</html>
0
 
integrosysAuthor Commented:
Thanks. The solution from objects works for me. Somehow, CEHJ's solution doesn't seem to work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.