I have a line like this:
<EMBED SRC="ObtainingAndBuilding_Linux.swf" WIDTH=200 HEIGHT=300</EMBED>
that I want to replace 200 and 300 by the browser window width and height.
I found some code like this which correctly gets and displays the width and height:
<HTML>
<head>
<script>
function showWH(){
if (document.all){
cW=document.body.offsetWidth
cH=document.body.offsetHeight
window.resizeTo(500,500)
barsW=500-document.body.offsetWidth
barsH=500-document.body.offsetHeight
wW=barsW+cW
wH=barsH+cH
window.resizeTo(wW,wH)
}
else
{
wW=window.outerWidth
wH=window.outerHeight
}
alert(wW+' '+wH)
}
</script>
</head>
<BODY onload="showWH()">
<EMBED SRC="ObtainingAndBuilding_Linux.swf" WIDTH=200 HEIGHT=300 quality=low loop=false TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</BODY></HTML>
However, when I replace the hard coded with and height with:
WIDTH=wW HEIGHT=wH
The object gets very small (i.e. it is not any where near the window size.) Is there some syntax I am missing to get the value of these variables? (like a "${wH}" or something?)
Thanks,
David