MediaZeal Web Design: Browser Checker
Home
Services
Pricing
Portfolio
Worksheet
Contact

Tips & Tricks for the Web
Browser Checker
This JavaScript is free at The JavaScript Source!!

MediaZeal will gladly help you with JavaScript problems. Learn more about our JavaScript Solutions.

All of the properties called in this JavaScript are built in. There are 3 parts to this script. The script in the head section, the form you paste into your page to display results and calling the function in the body tag. Below you are seeing information about your browser. Scroll down below the display table to see the code.
Platform:
Browser:
Version:
Code Name:
Color Depth: bit
Colors:
Current Resolution: X
Max Resolution: X
Java Enabled:
Anti-Aliasing Fonts:
Now Here's the Code

First paste the actual code into the head section of your page:

<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- begin
function display() {
window.onerror=null;

colors = window.screen.colorDepth;
document.form.color.value = Math.pow (2, colors);
if (window.screen.fontSmoothingEnabled == true)
document.form.fonts.value = "Yes";
else document.form.fonts.value = "No";

document.form.navigator.value = navigator.appName;
document.form.version.value = navigator.appVersion;
document.form.colordepth.value = window.screen.colorDepth;
document.form.width.value = window.screen.width;
document.form.height.value = window.screen.height;
document.form.maxwidth.value = window.screen.availWidth;
document.form.maxheight.value = window.screen.availHeight;
document.form.codename.value = navigator.appCodeName;
document.form.platform.value = navigator.platform;
if (navigator.javaEnabled() < 1) document.form.java.value="No";
if (navigator.javaEnabled() == 1) document.form.java.value="Yes";

if(navigator.javaEnabled() && (navigator.appName != "Microsoft Internet Explorer")) {
vartool=java.awt.Toolkit.getDefaultToolkit();
addr=java.net.InetAddress.getLocalHost();
host=addr.getHostName();
ip=addr.getHostAddress();
alert("Your host name is '" + host + "'\nYour IP address is " + ip);
}
}
// end -->
</script>

<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

//-->
</script>
Now paste this form into your page:

<form name=form>
<table cellpadding="1" cellspacing="0" border="0" align="center">
<tr>
<td class="copy" bgcolor="#8b4513">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Platform: </td>
<td bgcolor="#fffff0"> <input type=text size=15 maxlength=15 name=platform> </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Browser: </td>
<td bgcolor="#fffff0"> <input type=text size=25 maxlength=25 name=navigator> </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Version: </td>
<td bgcolor="#fffff0"> <input type=text size=45 maxlength=45 name=version> </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Code Name: </td>
<td bgcolor="#fffff0"> <input type=text size=15 maxlength=15 name=codename> </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Color Depth: </td>
<td bgcolor="#fffff0"> <input type=text size=2 maxlength=2 name=colordepth> bit </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Colors: </td>
<td bgcolor="#fffff0"> <input type=text size=12 maxlength=12 name=color> </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Current Resolution: </td>
<td bgcolor="#fffff0"> <input type=text size=4 maxlength=4 name=width> X <input type=text size=4 maxlength=4 name=height> </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Max Resolution: </td>
<td bgcolor="#fffff0"> <input type=text size=4 maxlength=4 name=maxwidth> X <input type=text size=4 maxlength=4 name=maxheight> </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Java Enabled: </td>
<td bgcolor="#fffff0"> <input type=text size=3 maxlength=3 name=java> </td>
</tr>
<tr>
<td align="RIGHT" bgcolor="#8b4513"> Anti-Aliasing Fonts: </td>
<td bgcolor="#fffff0"> <input type=text size=3 maxlength=3 name=fonts> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
Finally, call the function in the body tag:

onLoad="display();"
link to MediaZeal home page

© 2000- MediaZeal Web Design Sacramento :: Site map