Forum Moderators: open
function() {
if ((screen.width>=800) && (screen.height>=600))
{
document.write('Your resolution is "+screen.width+"x"+screen.height+" Please switch to at last 1152x864');
}
else if ((screen.width>=1024) && (screen.height>=768))
{
document.write('Your resolution is "+screen.width+"x"+screen.height+" Please switch to at last 1152x864');
}
else
{
document.write('');
}
});
What's the purpose of telling someone with a small screen they need as bigger screen?
TheKiller
jalarie ... try to be helpful here
Could anyone please help me with a script that Detects if the visitor uses 800x600 or 1024x768 ?
<script type="text/javascript">
if (navigator.appName == 'Netscape') {
W=window.innerWidth;
} else {
W=document.body.clientWidth;
}
if (W < 1152) {
alert("The Site is best viewed in 1152x864 or highter");
}
</script>
So, i want to detect, If the visitors size is 800x600 or 1024x768, and give them an alert(), telling them,"The Site is best viewed in 1152x864 or highter" or something alike that...
i am just telling them that the site is best viewed in the x resolution. if they want to switch that,or not.its their decision.
TheKiller
@Jalarie, i asked someone to test in IE6 And she dosnt see anything... (she uses 1024) But she sees the text if she opens it in FF
jalarie: I only tested it in Opera, IE6, FireFox, Mozilla, Netscape4, Netscape7, Ace Explorer, and SlimBrowser. Sorry, I don't have IE8.