Here is the script which determines the browser resolution -
Code:
<script>
function CheckResolution()
{
if(window.screen.width >= 1024 && window.screen.height >= 768)
{
document.getElementById("imgLaunch").style.display = 'block';
document.getElementById("imgMessage").style.display = 'none';
}
else
{
document.getElementById("imgLaunch").style.display = 'none';
document.getElementById("imgMessage").style.display = 'block';
}
}
</script>
<!-- below code within the body -->
<td>
<img id="imgLaunch" style="display:none;" src="images/icon_success.jpg" width="156" height="123" border="0">
<img id="imgMessage" style="display:none;" src="images/icon_failure.jpg" width="156" height="123" border="0">
</td>
the purpose of the above code is to Check if the browser resolution is above 1024, if it is equal or above 1024, it should display an image and if it is below, it should display a different image
Please help me change the script to successfully capture the "current" browser resolution and display the application.
Thanks
Bookmarks