0

This script will lists all available methods, properties, values, and types, supported inside your browser. This is useful when you are creating script and you want to see a full reference lists of methods supported on the browser that you are working on -

then you can simply run the script and you will get all the answers you need without spending to much time, searching the net for a particular methods supported by the different types of browsers...

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml-stylesheet type="text/css" href="#css21" media="screen"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="xhtml10S" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://www.w3.org/2005/10/profile">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Window-target" content="_top" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>Browser Capability Check</title>
<style id="css21" type="text/css" media="screen">
/* <![CDATA[ */
html, body {
   border : none;
   font : normal normal normal 85%/1.6 Verdana, Arial, Sans-Serif;
   margin : 0;
   padding : 0;
   height : auto;
   min-width : 600px;
   width : auto;
   text-align : center; }

body { background-color : #f0ffff; }

thead { 
   background-color : #fff;
   font-weight : bold; 
   color : #708090;
   text-align : center;
   text-transform : uppercase;
   letter-spacing : normal; }

table {
   margin : 0;
   padding : 0;
   border : none;
   border-collapse : separate;
   text-align : left;
   cell-spacing : 4px;
   width : 100%; }

td { 
   padding : .100em 1em .100em 1em;
   border-top : 1px solid #eee;
   border-bottom : 1px solid #eee;
   vertical-align : middle;
   width : auto; }  

tbody td:first-child {
   padding : .100em;
   background-color : #fff;
   width : 8%;
   text-align : center;
 }
div {
   border : none;
   margin : 0;
   padding : 0; }
div#content {
   padding : 1em; }
div#main {
   margin : 0 auto;
   width : 100%;
   overflow : hidden; }

div.tube {
   background-color : #f7f7f7;
   letter-spacing : 2px;
   color : #708090;
   border : 1px solid #eee;
   padding : .500em; }

/* ]]> */
</style> 
<script type="text/javascript">
// <![CDATA[
/*******************************
 * Developed By DANIuser : essential -

 * Created : July 23rd, 2009 -
 * Title : Browser-Capability-Checker v1.0 -
 * This notice MUST stay intact for use - 

 * http://www.daniweb.com/forums/member383844.html
*******************************/
var modern = Boolean((( !!document.all === true && !!!document.getElementById ) ? 0 : 1 ));

var xCapabilities = ( function( e ) {
var e = (( e ) ? eval( e )  : window.event ); 
var xTable = 0;
var count = 1;
var xElem = null;
var xCell = null;
var xDivID = "showCapabilities";
var xDiv = (( modern ) ? document.getElementsByTagName( "div" )[ xDivID ] : document.all.tags( "div" )[ xDivID ] );
   tableX = (( modern ) ? xDiv.getElementsByTagName( "table" ) : xDiv.all.tags("table").item( 0 ));
   (( tableX[ 0 ] ) ? xDiv.removeChild( tableX[ 0 ] ) : tableX );
   delete tableX;
   if ( "createElement" in document ) { 
      xCell = ( function( row, text ) {
         var xCel = row.insertCell( -1 );
         return xCel.appendChild( document.createTextNode( text )); 
      } ); 
      xElem = ( function( element ) {
         return document.createElement( element );
      } );
      xTable = xElem( "table" );
      var xTHead = xTable.createTHead();  
      var xRow = xTHead.insertRow( -1 );
      var xLabel = [ "#", "Property", "Value", "Type" ];
      var xLen = xLabel.length;
      for ( i = 0; i < xLen; i++ ) {
         xCell( xRow, xLabel[ i ] );
      } delete i; 
      var xTBody = xElem( "tbody" ); 
      xTable.appendChild( xTBody );
      for ( prop in e ) {
         xRow = xTBody.insertRow( -1 );
         xCell( xRow, count );
         xCell( xRow, prop );
         xCell( xRow, e[ prop ] );
         xCell( xRow, typeof( e[ prop ] ));
         xRow.lastChild.style.textAlign = "center";
     ++count; 
      } delete prop;
   xDiv.appendChild( xTable );
   return;
   } alert( "Your browser is not capable of handling this type of script! You'll need to wait for my next version.\n- essential", "http://www.daniweb.com" );
   return false;
} ); 
window.onload = function( event ) {
   var xSel = (( modern ) ? document.getElementById( "browser" ) : document.all.browser );
   xSel.onchange = ( function( event ) {
     xCapabilities( this.value );
   } );
   xCapabilities( event ); 
}
// ]]>
</script>
<meta name="author" content="essential - ( http://www.daniweb.com/forums/member383844.html )" />
</head>
<body>
<div id="content">
<div id="main">
<div class="tube" style="border-bottom : none; clear: both;">
<select id="browser" name="browser" size="1">
<option value="event" selected="selected">- EVENT Objects -</option>
<option value="window">- WINDOW Objects -</option>
<option value="document">- DOCUMENT Objects -</option>
<option value="navigator">- NAVIGATOR Objects -</option></select>
</div>
<div class="tube" id="showCapabilities"></div>
</div>
</div>
</body>
</html>
1
Contributor
0
Replies
6
Views
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.