When simply providing information, the document.write() method can always be replaced by the alert() method, though not always the other way around. So, assuming this is a valid DD script that works as written (looks to be), you can just switch from document.write to alert:
Code:
<script type="text/javascript">
/*
Screen resolution detection and notification Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
var correctwidth=1024
var correctheight=768
if (screen.width!=correctwidth||screen.height!=correctheight)
alert("This webpage is best viewed with screen resolution "+correctwidth+"*"+correctheight+". Your current resolution is "+screen.width+"*"+screen.height+". If possible, please change the resolution!")
</script>
Notes: Extraneous 'hiding comments' removed. Opening script tag updated to current convention.
Bookmarks