P
Put 030516 in email subj to get thru
I've always been bothered about having to statically declare the size of
a Java applet window (container?) in the calling HTML. I've always
wanted the moral equivalent of width=50% statement (of the window or
frame). I'm trying to use Javascript to do so.
I can sort of get an example working in a Mozilla browser:
So the document.write statement produces a normal looking applet string
like this:
<applet code=MyApplet.class width=252.5 height=252.5></applet>
Which gets intepreted by the browser, kicking off the Java applet. But
as you resize the browser the alignment with other text in the html
window is funky. Also, in the above example, the window.innerWidth is
apparently from the Mozilla/Netscape DOM, not MS-IE's.
Does anybody have any Javascript examples of how to dynamically presize
an applet to some percentage of the window/frame width? (that's mostly
portable)
a Java applet window (container?) in the calling HTML. I've always
wanted the moral equivalent of width=50% statement (of the window or
frame). I'm trying to use Javascript to do so.
I can sort of get an example working in a Mozilla browser:
"></applet> <br>" ); </script><!-- This works on Mozilla only (and maybe netscape) -->
<script language="Javascript">
document.write( "<applet code=MyApplet.class width="
+ window.innerWidth/2 + " height=" + window.innerWidth/2 +
So the document.write statement produces a normal looking applet string
like this:
<applet code=MyApplet.class width=252.5 height=252.5></applet>
Which gets intepreted by the browser, kicking off the Java applet. But
as you resize the browser the alignment with other text in the html
window is funky. Also, in the above example, the window.innerWidth is
apparently from the Mozilla/Netscape DOM, not MS-IE's.
Does anybody have any Javascript examples of how to dynamically presize
an applet to some percentage of the window/frame width? (that's mostly
portable)