In my javascript file I have the following line:
<div id="mygraph" style="width:200px;height:100px;"></div>
I’d like to set the width and height values in the style tag from two variables that take their values from the corresponding functions:
var my_width = getWidth();
var my_height = getHeight();
How can I accomplish that? I’m missing the correct syntax. Thank you in advance…
The following assumes that
my_heightandmy_widthreturned by your functions are plain numbers: