Como seto o tamanho do applet para o navegador

aes pessoal,
como faço para setar o WIDTH e HEIGHT de um applet para que fique certinho no tamanho do navegador…
assim sendo o applet ficará do tamanho visivel para a resolucao do usuario e se a tela nao estiver maximizada ele tambem ficara no tamanho certo …
vlw

Para funcionar no IE

<html>
<head>
<script>
function acertaApplet()
{
    var w = document.documentElement.clientWidth;
    var h = document.documentElement.clientHeight;

    meuApplet.style.width = w;
    meuApplet.style.height = h;
}

</head>
<body onLoad="acertaApplet()">
<applet id="meuApplet" code="meuApplet.class" style="width: 10px; height: 10px;">
</applet>

</body>
</html>

Para funcionar no NS é só trocar o
document.documentElement.clientHeight
document.documentElement.clientWidth
por
window.scrollY + window.innerHeight
window.scrollX + window.innerWidth

ps.: não testei hehe

aes LIPE, tp…
não funcionou… ele ta deixando o applet de tamanho 10px como vocÊ setou no applet style…
vlw

tenta concatenar “px” no final… assim:

meuApplet.style.width = w + "px"; 

Vegetto ta certo :smiley:

tah ai como fiz…
vlw ai pela ajuda LIPE…

<HTML>
<HEAD>
<SCRIPT>
function acertaApplet()
{
Viewer.style.width = document.body[‘clientWidth’]-30;
Viewer.style.height = document.body[‘clientHeight’]-30;
}
</SCRIPT>
</HEAD>
<BODY onLoad=“acertaApplet()”>
<APPLET id=“Viewer” code=“Viewer.class” style=“width: 10px; height: 10px;”>
</APPLET>
</BODY>
</HTML>