Hello,
I am new to JavaScript and am working with SVG. I am trying to get the dimensions of a browser when it is minimized and maximized. What I have is:
document.body.clientWidth
document.body.clientHeight
but I keep getting "document.body has no properties" error.
What I have in terms of JavaScript declaration is this:
<script language="javascript"><![CDATA[
//code
]]></script>
I am not sure if this is the problem because I've seen other ways of embedding JavaScript code. Is there a more "versatile" way of getting browser's dimensions using JavaScript?
Thank you,
Victor.
I am new to JavaScript and am working with SVG. I am trying to get the dimensions of a browser when it is minimized and maximized. What I have is:
document.body.clientWidth
document.body.clientHeight
but I keep getting "document.body has no properties" error.
What I have in terms of JavaScript declaration is this:
<script language="javascript"><![CDATA[
//code
]]></script>
I am not sure if this is the problem because I've seen other ways of embedding JavaScript code. Is there a more "versatile" way of getting browser's dimensions using JavaScript?
Thank you,
Victor.