Hi, folks,
I'm trying to obtain screen. width, height, availWidth and availHeight,
but my code is failing. What's wrong?
I'm using external JS, thus:
<html>
<head>
<title>Screen Data</title>
</head>
<body>
<script type="text/javascript src="screendata.js> </script>
</body>
</html>
And here is my JS:
var sw = screen.width;
var sh = screen.height;
var aw = availWidth;
var ah = availHeight;

var swm = "Screen Width = ";
var shm = "Screen Height = ";
var awm = "Available Width = ";
var ahm = "Available Height = ";

document.write(swm + sw);
document.write(shm + sh);
document.write(awm + aw);
document.write(ahm + ah);
It's probably obvious, but I'm dim.
(I should sign myself Dim Doyce.)