use a JS-variable/function inside a tag
Hi!
I want to display an applet in a html page. I want to have it the maximum size, so that it exactly fits into the browser, without scrollbars.
To achieve this, I'm thinking of the following solution. Two javascript functions return the width and the height of the available area. This is no problem. However, I want to use these values in the WIDTH and HEIGHT attributes of the APPLET tag. Something like:
<script language="javascript" type="text/javascript">
function pageWidth() {return window.innerWidth .. ;}
function pageHeight() {return window.innerHeight .. ;}
</script>
<APPLET CODE=TheApplet.class HEIGHT=??? WIDTH=???>
How can I do this? Is there a way to use a javascript variable or -function inside a tag?
T.I.A.
|