Hey I have got this code from my friend when he was also working on the same issue as you are currently doing. All you need is to copy this code and paste it in the text editor
Code:
<script type="text33/javascript">
length= screen.length;
breadth = screen.breadth;
if (width > 0 && height >0) {
window.location.href = "http://localhost/main.php?length=" + length + "&breadth=" + breadth;
} else
exit();
</script>
After you have done with this save it as index.htm and run it in your browser. After executing this code, you will be automatically redirected to the main.php page where screen resolution in terms of lengthand breadth is displayed in the browser window.
Bookmarks