<i><b>Originally posted by : Chris (chris@crystal-net.com)</b></i><br />HI

<br /><br />how to write asp sctipt to check client platform & screen resolution(800x600)??<br /><br />Chris<br />
<i><b>Originally posted by : Mike B (mikeb811@hotmail.com)</b></i><br />Chris,<br /><br />Below is some code I found to check the screen resolution. Just cut and paste into a blank htm document and view it with the browser.<br /><br /><HTML><br /><HEAD><br /><TITLE>New Page</TITLE><br /><SCRIPT language="javascript1.2"><br /> s=screen.width;<br /> h=screen.height;<br /> b=navigator.appName;<br /> v=navigator.appVersion.charAt(0);<br /> if (b != "Netscape") {<br /> c=screen.colorDepth }<br /> else { <br /> c=screen.pixelDepth<br /> };<br /> <br /> j=navigator.javaEnabled();<br /></SCRIPT><br /><br /></HEAD><br /><BODY><br /><SCRIPT language="javascript"><br />document.write("Screen resolution = "+s+"x"+h);<br />document.write("<p>Browser name = "+b+"<br> Version = "+v);<br />document.write("<p>Color depth = "+c+" bit");<br />document.write("<p>Java enabled = "+j);<br /></Script><br /><p><br /><pre><br />Description:<br><br />This script prints out the results, but to get it more useful you can <br />redirect your visitors to pages that are optimized for their results. <br />Screen resolutions are often 640, 720, 800, 848, 1024, 1152 or 1280. <br />Browser name is mostly Microsoft Internet Explorer or Netscape. <br />Version is often 2,3,4 but as you will see updates from Netscape or <br />Microsoft please think that these updated browser may <br />return 5,6,7, and so on. Please note that Microsoft Internet <br />Explorer 5.0 returns 4. <br /><br />Color depths could be 8,16,24,32,64. (common is 16,24)<br /><br />Java is either true or false.<br /><br /></pre><br /></BODY><br /></HTML><br /><br />Also,<br /><br />I think that to get the platform on an ASP page you need to read the HTTP header. To do this use the following built-in ASP object - <br /><br />Request.ServerVariables("HTTP_USER_AGENT")<br /><br />which will return the string indicating the client software and version.<br /><br />Hope this helped.<br /><br />Mike<br />------------<br />Chris at 2/15/2000 11:16:57 AM<br /><br />HI

<br /><br />how to write asp sctipt to check client platform & screen resolution(800x600)??<br /><br />Chris<br />
Was this answer helpful ?
Yes No