Click to See Complete Forum and Search --> : Change to alert


soccer362001
09-04-2003, 11:03 AM
How would I chang this to be an alert instead of just text?



<script type="text/javascript">
<!-- Begin
var bestwidth = 1152;
var bestheight = 864;
if (screen.width != bestwidth || screen.height != bestheight) {
msg = "This site looks best when viewed when your screen "
+ "is set to a " + bestwidth + "x" + bestheight + " resolution, "
+ "but your screen resolution is " + screen.width + "x"
+ screen.height + ". Please change your screen resolution "
+ "to best view the site, if possible. Thanks!";
document.write(msg);
}
// End -->
</script>

AdamBrill
09-04-2003, 11:07 AM
Change this:

document.write(msg);

To this:

alert(msg);

requestcode
09-04-2003, 11:07 AM
Try changing this line:document.write(msg);
To this:alert(msg);

soccer362001
09-04-2003, 11:08 AM
Thank you both for your quick replies.