html code
======================
<script language="JavaScript">
var iW=screen.width;
if(iW>1200) iW-=350;
else
if(iW>=800) iW-=250;
else iW-=50;
var iH=iW*19/26;
var strLet="<APPLET codeBase=./classes width=";
strLet+=iW;
strLet+=" height=";
strLet+=iH;
strLet+=" code=ClassViewer.class></APPLET>";
document.write(strLet);
</script>
=======================
one problem is that if browser (IE) is not maximumed, the java applet can not be displayed well.
how to solve the problem? is there a html object function - such as onDocumentSize() or similar?
document.write()
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
There are some window methods for resizing and moving position..
If I remember correctly
But don't take my word for it, it's a while since I have the need to play around with a window itself.
You can also read the screen size, available size etc with...

If I remember correctly
Code: Select all
window.resizeTo(x, y);
window.moveTo(x, y);You can also read the screen size, available size etc with...
Code: Select all
var scrWidth = screen.availWidth();
var scrHeight = screen.availHeight();- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
You can also use:
...if you want to resize/move relatively.
Code: Select all
window.resizeBy(x, y);
window.moveBy(x, y);