Hi folks, i have tons of js in my various websites. this thing is defeating me
what the heck am i doing wrong?
it doesn't show the alert box.
Code:
----in head ---
<script>
function getres();
{
if(document.all) { //ie
var win_w = window.document.body.clientWidth;
var win_h = window.document.body.clientHeight;
}
if(document.layers) { //netscape
var win_w = window.innerWidth;
var win_h = window.innerHeight;
}
if(document.all || document.layers) {
var scr_w = window.screen.width;
var scr_h = window.screen.height;
}
var res = "Resolution : " + scr_w + " x " + scr_h;
var iwin = "Inner win : " + win_w + " x " + win_h;
alert (res + "\n" + iwin);
}
</script>
----------------------------------
in body
<script>
getres();
</script>