ctlo
asked on
how to get current screen resolution in javascript?
how to get current screen resolution in javascript?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry - duplicate post - please delete
What does that 19 do?
There is an offset difference between IE and netscape...
ctlo,
No comment has been added lately (0 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
RECOMMENDATION: Award points to mplungjan http:#7462767
Please leave any comments here within 7 days.
-- Please DO NOT accept this comment as an answer ! --
Thanks,
mplungjan
EE Cleanup Volunteer
No comment has been added lately (0 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
RECOMMENDATION: Award points to mplungjan http:#7462767
Please leave any comments here within 7 days.
-- Please DO NOT accept this comment as an answer ! --
Thanks,
mplungjan
EE Cleanup Volunteer
<html>
<head>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide from old browsers that do not support JavaScript.
var ScrnSize = "UnCommon"
if (navigator.appVersion.inde
navigator.appName.indexOf(
ScrnSize = screen.width + "x" + screen.height;
}
if (navigator.appVersion.inde
navigator.appName.indexOf(
ScrnSize = screen.width + "x" + (screen.height + 19); //Netscape sees 19 pixels less on Height
}
document.write('Browser Type=' + navigator.appName + '<BR>');
document.write('Browser Version=' + navigator.appVersion + '<BR>');
document.write('Screen Resolution=' + screen.width + "x" + screen.height);
// End hiding -->
</SCRIPT>
</body>
</html>