home *** CD-ROM | disk | FTP | other *** search
/ PC User 2005 May / CD / PCU0505CD.iso / software / full / coffecup / files / html2005.exe / %MAINDIR% / Javascript / BrowserID.xml < prev    next >
Encoding:
Text File  |  2005-02-16  |  1.9 KB  |  63 lines

  1. <ccResource>
  2.   <ccTitle>
  3. Browser ID
  4.   </ccTitle>
  5.   <ccCategory>
  6. Browser
  7.   </ccCategory>
  8.   <ccDescription>
  9. This Script allows the visitor to click on the buttons to display their browser's info.
  10.   </ccDescription>
  11.   <ccInstructions>
  12. Just put the beginning of this script between your pages open and closing head tags and the later part in the body where you want it displayed in your page.
  13.   </ccInstructions>
  14.   <ccHeadContent>
  15.   <script>
  16.  <!--
  17.  function CC_getBrowserName()   {   
  18.          document.forms[0].elements[0].value =navigator.appName;     
  19.  }
  20.  
  21.  function CC_getBrowserVersion()   {   
  22.          document.forms[0].elements[0].value =  navigator.appVersion;     
  23.  }
  24.  
  25.  function CC_getBrowserCodeName()   {   
  26.          document.forms[0].elements[0].value = navigator.appCodeName;     
  27.  }
  28.  
  29.  function CC_getBrowserUserAgent()   {   
  30.          document.forms[0].elements[0].value =  navigator.userAgent;     
  31.  }
  32.  
  33.  function CC_getBrowserNameVersion()   {   
  34.          document.forms[0].elements[0].value = navigator.appName + " " + navigator.appVersion;     
  35.  }
  36.  
  37.  // -->
  38.  </script>
  39.  
  40.   </ccHeadContent>
  41.   <ccBodyContent>
  42. <center>
  43.  <form NAME="detect">
  44.  <input TYPE="text" NAME="browser" SIZE="26" MAXLENGTH="40" VALUE="Browser Detection"><br>
  45.  <br><br>Choose a button to reveal your browser's self image.<br>
  46.  <input TYPE="button" VALUE="appName" onClick="CC_getBrowserName()">
  47.  <input TYPE="button" VALUE="appVersion" onClick="CC_getBrowserVersion()">
  48.  <input TYPE="button" VALUE="appCodeName" onClick="CC_getBrowserCodeName()">
  49.  <input TYPE="button" VALUE="userAgent" onClick="CC_getBrowserUserAgent()">
  50.  <input TYPE="button" VALUE="appName / appVersion" onClick="CC_getBrowserNameVersion()"><br><br><br>
  51.  </form>
  52.  </center><p>
  53.   </ccBodyContent>
  54.   <ccElementContent>
  55.   
  56.    <ccElementName></ccElementName>
  57.    <ccElementAction></ccElementAction>
  58.    
  59.   </ccElementContent>
  60.   <ccExtraData>
  61.  
  62.   </ccExtraData>
  63. </ccResource>