dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Web
Expertise: Intermediate
Jan 25, 2000

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Determine System Characteristics Using the Client Capabilities Behavior

Browsers Targeted: Internet Explorer 5

In Internet Explorer 5.0, you can determine the characteristics of the specific system through the use of the built-in Client Capabilities behavior (known as clientCaps). To do this, create a clientCaps object from a behavior (one way to do this is to use a SPAN element), then you can query for several different attributes. Note that most of this information will only be available to the behavior after the document has itself loaded, so you may want to retrieve this data in the window.onload event.

 
<span id="clientCaps" xmlns:ie="" style="behavior:url(#default#clientCaps);" />
 
<script language="JavaScript">
    function GetCaps(){
        buf="<table>"
        buf+="<tr><td>availWidth</td><td>"+clientCaps.availWidth+"</td></tr>";
        buf+="<tr><td>availHeight</td><td>"+clientCaps.availHeight+"</td></tr>";
        buf+="<tr><td>bufferDepth</td><td>"+clientCaps.bufferDepth+"</td></tr>";
        buf+="<tr><td>colorDepth</td><td>"+clientCaps.colorDepth+"</td></tr>";
        buf+="<tr><td>connectionType</td><td>"+clientCaps.connectionType+"</td></tr>";
        buf+="<tr><td>cookieEnabled</td><td>"+clientCaps.cookieEnabled+"</td></tr>";
        buf+="<tr><td>cpuClass</td><td>"+clientCaps.cpuClass+"</td></tr>";
        buf+="<tr><td>height</td><td>"+clientCaps.height+"</td></tr>";
        buf+="<tr><td>javaEnabled</td><td>"+clientCaps.javaEnabled+"</td></tr>";
        buf+="<tr><td>platform</td><td>"+clientCaps.platform+"</td></tr>";
        buf+="<tr><td>systemLanguage</td><td>"+clientCaps.systemLanguage+"</td></tr>";
        buf+="<tr><td>userLanguage</td><td>"+clientCaps.userLanguage+"</td></tr>";
        buf+="<tr><td>width</td><td>"+clientCaps.width+"</td></tr>";
        buf+="</table>";
        capsDisplay.innerHTML=buf
        }
window.onload=GetCaps;
</script>
 
<div id="capsDisplay" />
Kurt Cagle
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date