document.write()
Posted: Mon Oct 17, 2005 5:01 pm
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?
======================
<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?