Question: My object is to change object height in proportion to the viewers screen

I have the javascript code:

```
var rat = ((screen.availWidth / screen.availHeight)*100);
document.getElementById('myP').innerHTML=rat;

```

and want to apply it to the HTML code:

```
object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" width="100% height="id='myP'" id="myFlashContent" align="middle" allowFullScreen = "true"

```

but am unsure how to write the variable into the code.

Answer: 
try :

```
var rat = ((screen.availWidth / screen.availHeight)*100);
    d = document.getElementById('myP');
    d.style.height=rat+"%";

```
The way you are doing it is incorrect.

**1.** Assign an id to your object. 

```
 <object id="obj" classid="..." ....>

```

**2.** Change your javascript to 

```
var rat = ((screen.availWidth / screen.availHeight)*100);
document.getElementById('obj').setAttribute("height", rat);

```